From: Wang Chen <wangchen@cn.fujitsu.com>
To: dhowells@redhat.com
Cc: linux-afs@lists.infradead.org, NETDEV <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH] RXRPC: Use skb_queue_walk_safe()
Date: Thu, 22 May 2008 18:05:47 +0800 [thread overview]
Message-ID: <4835457B.3050300@cn.fujitsu.com> (raw)
Because the list could be modified inside the loop, use
skb_queue_walk_safe().
Signed-off-by: Wang Chen <wangchen@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
next reply other threads:[~2008-05-22 10:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 10:05 Wang Chen [this message]
2008-05-22 14:10 ` [PATCH] RXRPC: Use skb_queue_walk_safe() David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4835457B.3050300@cn.fujitsu.com \
--to=wangchen@cn.fujitsu.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.