Netdev List
 help / color / mirror / Atom feed
From: Benjamin Beichler <benjamin.beichler@uni-rostock.de>
To: Kirill Tkhai <ktkhai@virtuozzo.com>, <davem@davemloft.net>,
	<johannes@sipsolutions.net>, <kvalo@codeaurora.org>,
	<linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 1/2] mac80211_hwsim: Make hwsim_netgroup IDA
Date: Sat, 3 Mar 2018 09:01:42 +0100	[thread overview]
Message-ID: <BDC4B82F-94DD-4580-B216-7F75AF189C3A@uni-rostock.de> (raw)
In-Reply-To: <5319c18f-ce39-0d4c-e140-50b48b73803f@virtuozzo.com>



Am 2. März 2018 12:37:25 MEZ schrieb Kirill Tkhai <ktkhai@virtuozzo.com>:
>destroy_radio() may be executed in parallel with everything above you
>wrote,
>doesn't it? There may be several network namespaces, and
>destroy_radio()
>queued from one net namespace may race with mac80211_hwsim_new_radio()
>or hwsim_del_radio_nl() for another net namespace. I don't see, how
>netlink
>locking can act on synchronization with a work. This is what I mention.
>
I see, you are right. Nonetheless, this value is pretty uncritical, since the user (the netlink dump) only checks whether it changes within a dump and even if there would be race conditions, e.g. some generations would be skipped caused by parallel writing, it would also set the dump interrupted flag, and the user space program knows, if it needs exact results, it needs to dump again. I'm unsure about things like caching of this variable. Maybe it needs a volatile flag to work always as expected.

Unfortunately, currently the code triggers a dump interrupted also when the interfaces of the current namespace didn't change, but I think that is acceptable. Otherwise we need a per namespace generation and I think all this happens really rare and it's not worth the effort.


>Thanks,
>Kirill

-- 
M.Sc. Benjamin Beichler

Universität Rostock, Fakultät für Informatik und Elektrotechnik
Institut für Angewandte Mikroelektronik und Datentechnik

University of Rostock, Department of CS and EE
Institute of Applied Microelectronics and CE

Richard-Wagner-Straße 31
18119 Rostock
Deutschland/Germany

phone: +49 (0) 381 498 - 7278
email: Benjamin.Beichler@uni-rostock.de
www: http://www.imd.uni-rostock.de/

  reply	other threads:[~2018-03-03  8:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 11:30 [PATCH net-next 0/2] Converting pernet_operations (part #3) (wireless, mac80211_hwsim) Kirill Tkhai
2018-03-01 11:30 ` [PATCH net-next 1/2] mac80211_hwsim: Make hwsim_netgroup IDA Kirill Tkhai
2018-03-01 17:22   ` Benjamin Beichler
2018-03-02 11:37     ` Kirill Tkhai
2018-03-03  8:01       ` Benjamin Beichler [this message]
2018-03-01 11:30 ` [PATCH net-next 2/2] net: Convert hwsim_net_ops Kirill Tkhai

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=BDC4B82F-94DD-4580-B216-7F75AF189C3A@uni-rostock.de \
    --to=benjamin.beichler@uni-rostock.de \
    --cc=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=ktkhai@virtuozzo.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox