From: Johannes Berg <johannes@sipsolutions.net>
To: Yogesh Ashok Powar <yogeshp@marvell.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"John W. Linville" <linville@tuxdriver.com>,
Andreas Hartmann <andihartmann@01019freenet.de>
Subject: Re: [PATCH 2/2] mac80211: Fixing Races for skipping tailroom reservation
Date: Wed, 22 Jun 2011 15:12:06 +0200 [thread overview]
Message-ID: <1308748326.29571.6.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20110622125853.GA4982@hertz.marvell.com>
On Wed, 2011-06-22 at 18:28 +0530, Yogesh Ashok Powar wrote:
> On Wed, Jun 22, 2011 at 05:49:25AM -0700, Johannes Berg wrote:
> > On Wed, 2011-06-22 at 18:01 +0530, Yogesh Ashok Powar wrote:
> > > > Will work on some other logic.
> > >
> > > Following is the complete V2-patch
> > >
> > > v2 changes: a) Moved counter++ before __ieee80211_key_replace in
> > > key_link()
> > > b) Moved crypto_tx_tailroom_needed_cnt to sdata resolve
> > > issue with multiple sdata instances in hw reset.
> >
> > Looks good. Now I'm just worried about memory and compiler barriers that
> > may be needed so the counter update doesn't move after anything else...
> > Hmm.
>
> I some how feel that synchronize_net may be replaced with
> synchronize_rcu and still the race wont happen.
>
> So the new logic would be
> - counter++ <-- Here keys are not added or deleted
> so rcu readers wont have problem
> with extra space allocated.
>
> - synchronize_rcu <-- This will flush existing readers. Again
> new readers will have no problem with extra
> space allocated.
>
> Let me know your opinion on this.
It doesn't really matter -- synchronize_net() is exactly the same as
synchronize_rcu().
What I'm worried about is that there's no memory barrier after the
counter update, so how do we know it cannot happen after
synchronize_rcu()? I think we need something like rcu_assign_pointer()
but I don't see rcu_assign_index() (any more?)
johannes
next prev parent reply other threads:[~2011-06-22 13:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 10:21 [PATCH 0/2] mac80211: Fixing races for hw crypto skipping tailroom Yogesh Ashok Powar
2011-06-16 10:25 ` [PATCH 1/2] Revert "Revert "mac80211: Skip tailroom reservation for full HW-crypto devices"" Yogesh Ashok Powar
2011-06-16 10:27 ` [PATCH 2/2] mac80211: Fixing Races for skipping tailroom reservation Yogesh Ashok Powar
2011-06-16 15:36 ` Johannes Berg
2011-06-17 13:25 ` Yogesh Ashok Powar
2011-06-17 17:24 ` Johannes Berg
2011-06-20 14:30 ` Yogesh Ashok Powar
2011-06-20 15:29 ` Johannes Berg
2011-06-20 16:49 ` Yogesh Powar
2011-06-20 17:29 ` Johannes Berg
2011-06-21 13:03 ` Yogesh Ashok Powar
2011-06-21 13:43 ` Johannes Berg
2011-06-21 14:10 ` Yogesh Ashok Powar
2011-06-21 14:40 ` Johannes Berg
2011-06-21 16:33 ` Yogesh Ashok Powar
2011-06-21 17:44 ` Andreas Hartmann
2011-06-22 7:17 ` Yogesh Ashok Powar
2011-06-22 12:31 ` Yogesh Ashok Powar
2011-06-22 12:49 ` Johannes Berg
2011-06-22 12:58 ` Yogesh Ashok Powar
2011-06-22 13:12 ` Johannes Berg [this message]
2011-06-23 11:52 ` Yogesh Powar
2011-06-24 9:04 ` yogeshp
2011-06-25 13:07 ` Johannes Berg
2011-06-27 6:02 ` [PATCH] nl80211: use netlink consistent dump feature for BSS dumps Walter Goldens
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=1308748326.29571.6.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=andihartmann@01019freenet.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=yogeshp@marvell.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).