diff options
author | phil.turnbull@oracle.com <phil.turnbull@oracle.com> | 2016-07-26 15:14:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-13 10:31:26 +0200 |
commit | 890a9c4b3feff8287fa0ee2f82a8d788beeb8235 (patch) | |
tree | 561f40eb4b10b45eef5a2a0ba944df5527ed7100 /net/l2tp/l2tp_ip6.c | |
parent | b4a7e78cb78bbfaa582c8e67e1b6a7e205757050 (diff) |
l2tp: Correctly return -EBADF from pppol2tp_getname.
commit 4ac36a4adaf80013a60013d6f829f5863d5d0e05 upstream.
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: fd558d186df2 ("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>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/l2tp/l2tp_ip6.c')
0 files changed, 0 insertions, 0 deletions