Search Linux Wireless

Re: [PATCH v3 3/5] mac80211_hwsim: add generation count for netlink dump operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux