[PATCH] RXRPC: Use skb_queue_walk_safe()
Wang Chen
wangchen at cn.fujitsu.com
Thu May 22 06:05:47 EDT 2008
Because the list could be modified inside the loop, use
skb_queue_walk_safe().
Signed-off-by: Wang Chen <wangchen at cn.fujitsu.com>
---
net/rxrpc/ar-ack.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/rxrpc/ar-ack.c b/net/rxrpc/ar-ack.c
index 3ac1672..cbd70d1 100644
--- a/net/rxrpc/ar-ack.c
+++ b/net/rxrpc/ar-ack.c
@@ -468,6 +468,7 @@ static void rxrpc_insert_oos_packet(struct rxrpc_call *call,
{
struct rxrpc_skb_priv *sp, *psp;
struct sk_buff *p;
+ struct sk_buff *tmp;
u32 seq;
sp = rxrpc_skb(skb);
@@ -482,7 +483,7 @@ static void rxrpc_insert_oos_packet(struct rxrpc_call *call,
/* insert into the buffer in sequence order */
spin_lock_bh(&call->lock);
- skb_queue_walk(&call->rx_oos_queue, p) {
+ skb_queue_walk_safe(&call->rx_oos_queue, p, tmp) {
psp = rxrpc_skb(p);
if (ntohl(psp->hdr.seq) > seq) {
_debug("insert oos #%u before #%u",
--
1.5.4.rc3
More information about the linux-afs
mailing list