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)
commite5dadc65f9e0177eb649bcd9d333f1ebf871223e
tree3bda78ff436360497a70f52a51668355b0693138
parentdf39a9f106d53532443a804352894480ca6ca5fd
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: 55454a565836 ("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