From: Johannes Berg <johannes@sipsolutions.net>
To: Pravin Shelar <pshelar@nicira.com>
Cc: netdev <netdev@vger.kernel.org>, Thomas Graf <tgraf@suug.ch>
Subject: Re: [PATCH 2/2] genetlink: convert family dump code to use RCU
Date: Thu, 22 Aug 2013 09:17:30 +0200 [thread overview]
Message-ID: <1377155850.14110.15.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CALnjE+oqN0NC1xmzTRFXOuMb+4L83JJyo5SGqBTvW-KfefE39g@mail.gmail.com>
On Wed, 2013-08-21 at 21:32 -0700, Pravin Shelar wrote:
> I send out a fix which fixes genl locking for dump operation and it
> might fix this issue, Can you try this?
I don't think that fix is correct. I don't have a copy, so let me reply
here.
> http://marc.info/?l=linux-netdev&m=137714389705485&w=2
> In case of genl-family with parallel ops off, dumpif() callback
> is expected to run under genl_lock,
> But commit def3117493eafd9df
> (genl: Allow concurrent genl callbacks.) changed this behaviour
> where only first dumpit() op was called under genl-lock.
I don't think either of those statements are true - dump() has alway
taken a shortcut in netlink_recvmsg() and doesn't go into genl_rcv(), so
how could your patch have changed locking? Therefore, it can't have been
expected either.
> For subsequent dump, only nlk->cb_lock was taken.
> Following patch fixes it by defining locked dumpit() and done()
> callback which takes care of genl-locking.
This might help for generic netlink itself, but I'm not convinced that
it's really useful for other families. I've fixed bugs like in commit
3a5a423bb958ad22eeccca66c533e85bf69ba10e, which actually made it in
after your commit, but per above I don't think it was actually a problem
introduced by your commit.
johannes
next prev parent reply other threads:[~2013-08-22 7:17 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
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 [this message]
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=1377155850.14110.15.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.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 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).