]> git.baikalelectronics.ru Git - kernel.git/commit
l2tp: Correctly return -EBADF from pppol2tp_getname.
authorphil.turnbull@oracle.com <phil.turnbull@oracle.com>
Tue, 26 Jul 2016 19:14:35 +0000 (15:14 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Jul 2016 22:19:46 +0000 (15:19 -0700)
commit4606ea322292469f85d2621ec7087bcc620d4610
treec46aae34abc1e0b5184dd020d168e22facf56015
parent116711626cabaeefebbf61b2ffd9887d6716f78b
l2tp: Correctly return -EBADF from pppol2tp_getname.

If 'tunnel' is NULL we should return -EBADF but the 'end_put_sess' path
unconditionally sets 'error' back to zero. Rework the error path so it
more closely matches pppol2tp_sendmsg.

Fixes: b2079113577e ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
Signed-off-by: Phil Turnbull <phil.turnbull@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_ppp.c