From: Johannes Berg <johannes@sipsolutions.net>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, tgraf@suug.ch,
Pravin Shelar <pshelar@nicira.com>
Subject: Re: [PATCH 1/2] Revert "genetlink: fix family dump race"
Date: Thu, 22 Aug 2013 22:36:09 +0200 [thread overview]
Message-ID: <1377203769.32535.5.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <20130822.132631.2273195424430844661.davem@davemloft.net>
On Thu, 2013-08-22 at 13:26 -0700, David Miller wrote:
> How to deal with the problem we were attempting to solve is still
> under discussion. It seems that even if we go to RCU we must also
> address to module reference count issue.
Yes, that's a separate issue. However, I think we should also check in
more detail the dumpit locking issue Pravin pointed out - before his
changes there was indeed the genl lock used as the cb_mutex. As I've
said over in the other thread, I'm not sure that change was actually
useful - it sounded like he confused kernel sockets and userland sockets
here? (Or maybe I am?!)
OTOH, we've already fixed the race conditions that resulted from his
patch, at least in nl80211. You might remember the issue Linus ran into
with the attrbuf, it's looking like that issue was because he changed
generic netlink to no longer use the genl_lock as the cb_mutex.
> I think the existing locking is very messy, and RCU looks a lot
> cleaner and has potential for future improvements to the scalability
> of dumps.
I agree, though we're not all that interested in generic netlink family
scalability I think, we have less than a dozen families, so this
shouldn't really be an issue.
> So I'd like to propose that we combine Johannes's RCU conversion
> with some variant of the module reference count fix.
>
> Can you guys work together and come up with something I can apply?
Sure, that in itself isn't really a problem, but if we don't take
Pravin's patch to "revert" the cb_mutex change in his parallel_ops
changes, then we definitely need to audit all generic netlink dumpit
implementations in all users to see if they have similar races to
nl80211. I originally thought that it was an nl80211 problem, but I'm
now convinced that it wasn't. Still the new code in nl80211 is probably
nicer, and we can probably make it parallel_ops now due to these changes
but I'm not convinced we can audit all genl families.
If it wasn't that so much time has already passed since the parallel_ops
changes I'd almost suggest reverting those altogether and addressing the
locking properly ...
johannes
next prev parent reply other threads:[~2013-08-22 20:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 14:08 [PATCH 0/2] fix generic netlink locking issue(s) Johannes Berg
2013-08-21 14:08 ` [PATCH 1/2] Revert "genetlink: fix family dump race" Johannes Berg
2013-08-22 4:29 ` Pravin Shelar
2013-08-22 20:26 ` David Miller
2013-08-22 20:36 ` Johannes Berg [this message]
2013-08-22 21:27 ` Pravin Shelar
2013-08-21 14:08 ` [PATCH 2/2] genetlink: convert family dump code to use RCU Johannes Berg
2013-08-22 4:32 ` Pravin Shelar
2013-08-22 7:17 ` Johannes Berg
2013-08-21 19:05 ` [PATCH 0/2] fix generic netlink locking issue(s) Oliver Hartkopp
2013-08-21 22:53 ` Pravin Shelar
2013-08-22 6:51 ` 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=1377203769.32535.5.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
--cc=tgraf@suug.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.