net: add a recursion limit in xmit path
[ Upstream commits
745e20f1b626b1be4b100af5d4bf7b3439392f8f and
11a766ce915fc9f8663714eac6d59239388534ea ]
As tunnel devices are going to be lockless, we need to make sure a
misconfigured machine wont enter an infinite loop.
Add a percpu variable, and limit to three the number of stacked xmits.
Reported-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>