From: Johannes Berg <johannes@sipsolutions.net>
To: Benjamin Beichler <Benjamin.Beichler@uni-rostock.de>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v3 3/5] mac80211_hwsim: add generation count for netlink dump operation
Date: Mon, 22 Jan 2018 14:24:13 +0100 [thread overview]
Message-ID: <1516627453.2508.31.camel@sipsolutions.net> (raw)
In-Reply-To: <3c846ba5-a017-1993-79c6-2e33d78dfcf4@uni-rostock.de>
On Mon, 2018-01-15 at 15:28 +0100, Benjamin Beichler wrote:
> Am 15.01.2018 um 13:08 schrieb Johannes Berg:
> > On Wed, 2018-01-10 at 17:42 +0100, Benjamin Beichler wrote:
> > > Change the dump iteration to be independent from
> > > increasing radio indices on radio list.
> >
> > You can't do that, data structures can be deleted while the dump is
> > ongoing.
>
> That's what I try to address with this patch. In the past there were
> corner cases, which might have failed while deletion.
Hah, ok.
> Nonetheless, the radio count is in the current version strictly
> monotonic, maybe the description is misleading. :-)
> So in the inner loop there is no deletion possible because of the
> spinlock, and multiple calls of nl_dump check the generation count and
> cancel if it have changed.
Ah, I missed that you cancel when it's changed, we don't usually do
that normally.
I'd still prefer if you could have the code not rely on the pointers,
because if somebody gets it wrong (forgets to update the generation
count) I'm not sure I want that to crash in some corner cases...
johannes
next prev parent reply other threads:[~2018-01-22 13:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180110164255.2763-1-benjamin.beichler@uni-rostock.de>
2018-01-10 16:42 ` [PATCH v3 1/5] mac80211_hwsim: add workqueue to wait for deferred radio deletion on mod unload Benjamin Beichler
2018-01-15 11:46 ` Johannes Berg
2018-01-10 16:42 ` [PATCH v3 2/5] mac80211_hwsim: add hashtable with mac address keys for faster lookup Benjamin Beichler
2018-01-15 11:46 ` Johannes Berg
2018-01-10 16:42 ` [PATCH v3 3/5] mac80211_hwsim: add generation count for netlink dump operation Benjamin Beichler
2018-01-15 12:08 ` Johannes Berg
2018-01-15 14:28 ` Benjamin Beichler
2018-01-22 13:24 ` Johannes Berg [this message]
2018-01-22 14:58 ` Benjamin Beichler
2018-01-10 16:42 ` [PATCH v3 4/5] mac80211_hwsim: add permanent mac address option for new radios Benjamin Beichler
2018-01-15 12:09 ` Johannes Berg
2018-01-15 14:39 ` Benjamin Beichler
2018-01-22 13:22 ` Johannes Berg
2018-01-15 12:14 ` Johannes Berg
2018-01-15 14:48 ` Benjamin Beichler
2018-01-22 13:23 ` Johannes Berg
2018-01-22 14:49 ` Benjamin Beichler
2018-01-22 14:51 ` Johannes Berg
2018-01-10 16:42 ` [PATCH v3 5/5] mac80211_hwsim: add hwsim_tx_rate_flags to netlink attributes Benjamin Beichler
2018-01-15 12:19 ` Johannes Berg
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=1516627453.2508.31.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=Benjamin.Beichler@uni-rostock.de \
--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 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).