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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Aug 2017 02:31:21 +0000 (19:31 -0700)
commit3b25bfc11cf95c75a52e2ca3745b5bffb5fb02dc
treeccb285a16b515a4e7cbc49d482304dec11e672d7
parent4c666b0d9070a095e945387bd674476820f79528
ppp: Fix false xmit recursion detect with two ppp devices

[ Upstream commit e5dadc65f9e0177eb649bcd9d333f1ebf871223e ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ppp/ppp_generic.c