]> git.baikalelectronics.ru Git - kernel.git/commit
ppp: Fix false xmit recursion detect with two ppp devices
authorGao Feng <gfree.wind@vip.163.com>
Mon, 17 Jul 2017 10:34:42 +0000 (18:34 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Jul 2017 18:20:33 +0000 (11:20 -0700)
commit7740371c8bc3c58bd7fbb8ce40964a72a772f6a3
tree3bda78ff436360497a70f52a51668355b0693138
parent8d42702e1ff93fddc6592f1ad56422942ad30ae6
ppp: Fix false xmit recursion detect with two ppp devices

The global percpu variable ppp_xmit_recursion is used to detect the ppp
xmit recursion to avoid the deadlock, which is caused by one CPU tries to
lock the xmit lock twice. But it would report false recursion when one CPU
wants to send the skb from two different PPP devices, like one L2TP on the
PPPoE. It is a normal case actually.

Now use one percpu member of struct ppp instead of the gloable variable to
detect the xmit recursion of one ppp device.

Fixes: eeb1f65d0d19 ("ppp: avoid dealock on recursive xmit")
Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
Signed-off-by: Liu Jianying <jianying.liu@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp/ppp_generic.c