PPPOL2TP: Fix SMP issues in skb reorder queue handling
authorJames Chapman <jchapman@katalix.com>
Mon, 7 Apr 2008 06:41:29 +0000 (23:41 -0700)
committerChris Wright <chrisw@sous-sol.org>
Sat, 19 Apr 2008 01:53:25 +0000 (18:53 -0700)
commit43bee598bd747dc6849d3c4f32a3a912200073c0
tree83045b57fb1c1defd8e267ffabb6a9dc00be4b3f
parent5998533a1a9aa7480329cca82bab577eec396679
PPPOL2TP: Fix SMP issues in skb reorder queue handling

Upstream commit: e653181dd6b3ad38ce14904351b03a5388f4b0f7

When walking a session's packet reorder queue, use
skb_queue_walk_safe() since the list could be modified inside the
loop.

Rearrange the unlinking skbs from the reorder queue such that it is
done while the queue lock is held in pppol2tp_recv_dequeue() when
walking the skb list.

A version of this patch was suggested by Jarek Poplawski.

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