]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PPPOL2TP: Make locking calls softirq-safe
authorJames Chapman <jchapman@katalix.com>
Mon, 7 Apr 2008 06:41:18 +0000 (23:41 -0700)
committerChris Wright <chrisw@sous-sol.org>
Sat, 19 Apr 2008 01:53:25 +0000 (18:53 -0700)
commit5998533a1a9aa7480329cca82bab577eec396679
tree726b8d129eb8a0debca4bfb35a5d682223000bc1
parent08fb454fcf51b9133bb6d88e009d89127238e24c
PPPOL2TP: Make locking calls softirq-safe

Upstream commit: cf3752e2d203bbbfc88d29e362e6938cef4339b3

Fix locking issues in the pppol2tp driver which can cause a kernel
crash on SMP boxes. There were two problems:-

1. The driver was violating read_lock() and write_lock() scheduling
   rules because it wasn't using softirq-safe locks in softirq
   contexts. So we now consistently use the _bh variants of the lock
   functions.

2. The driver was calling sk_dst_get() in pppol2tp_xmit() which was
   taking sk_dst_lock in softirq context. We now call __sk_dst_get().

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