All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@googlemail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: wireless <linux-wireless@vger.kernel.org>
Subject: Re: Locking problem reported for mainline
Date: Mon, 10 Jan 2011 20:18:35 +0100	[thread overview]
Message-ID: <201101102018.35232.chunkeey@googlemail.com> (raw)
In-Reply-To: <4D2B59EA.4000200@lwfinger.net>

On Monday 10 January 2011 20:11:38 Larry Finger wrote:
> On 01/10/2011 12:13 PM, Christian Lamparter wrote:
> > Does this patch help?
> > 
> > ---
> > diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> > index a6701ed..8f13a83 100644
> > --- a/net/mac80211/rx.c
> > +++ b/net/mac80211/rx.c
> 
> Did not compile. In ieee80211_release_reorder_frame at lines 552 and 554, rx is
> not defined.
> 
Oops,

you are right. Fixed the copy&paste error, so this one should compile.
---
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index a6701ed..936b932 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -549,7 +549,9 @@ static void ieee80211_release_reorder_frame(struct ieee80211_hw *hw,
 	tid_agg_rx->reorder_buf[index] = NULL;
 	status = IEEE80211_SKB_RXCB(skb);
 	status->rx_flags |= IEEE80211_RX_DEFERRED_RELEASE;
-	skb_queue_tail(&local->rx_skb_queue, skb);
+	spin_lock(&local->rx_skb_queue.lock);
+	__skb_queue_tail(&local->rx_skb_queue, skb);
+	spin_unlock(&local->rx_skb_queue.lock);
 
 no_frame:
 	tid_agg_rx->head_seq_num = seq_inc(tid_agg_rx->head_seq_num);
@@ -780,7 +782,9 @@ static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx)
 		return;
 
  dont_reorder:
-	skb_queue_tail(&local->rx_skb_queue, skb);
+	spin_lock(&local->rx_skb_queue.lock);
+	__skb_queue_tail(&local->rx_skb_queue, skb);
+	spin_unlock(&local->rx_skb_queue.lock);
 }
 
 static ieee80211_rx_result debug_noinline

  reply	other threads:[~2011-01-10 19:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10  5:03 Locking problem reported for mainline Larry Finger
2011-01-10 16:06 ` Stanislaw Gruszka
2011-01-10 18:13 ` Christian Lamparter
2011-01-10 19:11   ` Larry Finger
2011-01-10 19:18     ` Christian Lamparter [this message]
2011-01-11 16:31       ` Larry Finger
2011-01-11 19:45         ` Bob Copeland
2011-01-11 20:52           ` Larry Finger

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=201101102018.35232.chunkeey@googlemail.com \
    --to=chunkeey@googlemail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-wireless@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.