[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4835457B.3050300@cn.fujitsu.com>
Date: Thu, 22 May 2008 18:05:47 +0800
From: Wang Chen <wangchen@...fujitsu.com>
To: dhowells@...hat.com
CC: linux-afs@...ts.infradead.org, NETDEV <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH] RXRPC: Use skb_queue_walk_safe()
Because the list could be modified inside the loop, use
skb_queue_walk_safe().
Signed-off-by: Wang Chen <wangchen@...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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists