netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* problem with rtnetlink 'reference' count
@ 2017-10-23 14:25 Peter Zijlstra
  2017-10-23 15:32 ` Florian Westphal
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Zijlstra @ 2017-10-23 14:25 UTC (permalink / raw)
  To: David Miller; +Cc: fw, netdev

Hi,

I just ran across commit:

  019a316992ee ("rtnetlink: add reference counting to prevent module unload while dump is in progress")

And that commit is _completely_ broken.

 1) it not in fact a refcount, so using refcount_t is silly
 2) there is a distinct lack of memory barriers, so we can easily
    observe the decrement while the msg_handler is still in progress.
 3) waiting with a schedule()/yield() loop is complete crap and subject
    life-locks, imagine doing that rtnl_unregister_all() from a RT task.

Please fix..

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-10-24  9:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-23 14:25 problem with rtnetlink 'reference' count Peter Zijlstra
2017-10-23 15:32 ` Florian Westphal
2017-10-23 16:20   ` Peter Zijlstra
2017-10-23 16:37     ` Florian Westphal
2017-10-23 18:31       ` Peter Zijlstra
2017-10-23 19:37         ` Florian Westphal
2017-10-24  8:33           ` Peter Zijlstra
2017-10-24  9:10             ` Florian Westphal

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).