]> git.karo-electronics.de Git - karo-tx-linux.git/commit
l2tp: Fix possible oops if transmitting or receiving when tunnel goes down
authorJames Chapman <jchapman@katalix.com>
Mon, 9 Jun 2008 20:35:41 +0000 (13:35 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 16 Jun 2008 20:19:58 +0000 (13:19 -0700)
commit11f814feeb526e7be8253452382ce299634540c3
treebfb4dfe4dd3809dede04b35e6db8bb5366b7d505
parent42cd7667f27ebcf7c9aa3f814d8f0dd1aa1b39c1
l2tp: Fix possible oops if transmitting or receiving when tunnel goes down

[ upstream commit: 24b95685ffcdb3dc28f64b9e8af6ea3e8360fbc5 ]

Some problems have been experienced in the field which cause an oops
in the pppol2tp driver if L2TP tunnels fail while passing data.

The pppol2tp driver uses private data that is referenced via the
sk->sk_user_data of its UDP and PPPoL2TP sockets. This patch makes
sure that the driver uses sock_hold() when it holds a reference to the
sk pointer. This affects its sendmsg(), recvmsg(), getname(),
[gs]etsockopt() and ioctl() handlers.

Tested by ISP where problem was seen. System has been up 10 days with
no oops since running this patch. Without the patch, an oops would
occur every 1-2 days.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/net/pppol2tp.c