Re: 3.11-rc6 genetlink locking fix offends lockdep

2013-08-20 Thread Johannes Berg
On Tue, 2013-08-20 at 10:28 +0200, Johannes Berg wrote: > The only way to fix this that I see right now (that doesn't rewrite the > locking completely) would be to make genetlink use parallel_ops itself, > thereby removing the genl_lock() in genl_rcv_msg() and breaking all > those lock chains that

Re: 3.11-rc6 genetlink locking fix offends lockdep

2013-08-20 Thread Johannes Berg
On Tue, 2013-08-20 at 21:02 +0200, Johannes Berg wrote: > On Tue, 2013-08-20 at 10:28 +0200, Johannes Berg wrote: > > > The only way to fix this that I see right now (that doesn't rewrite the > > locking completely) would be to make genetlink use parallel_ops itself, > > thereby removing the genl_

Re: 3.11-rc6 genetlink locking fix offends lockdep

2013-08-20 Thread Hugh Dickins
On Tue, 20 Aug 2013, Borislav Petkov wrote: > On Tue, Aug 20, 2013 at 10:28:58AM +0200, Johannes Berg wrote: > > Something like the patch below, perhaps? Completely untested so far. > > Yeah, this one seems to fix it here (I was seeing the same lockdep splat > as Hugh). Not so good for me: it fix

Re: 3.11-rc6 genetlink locking fix offends lockdep

2013-08-20 Thread Borislav Petkov
On Tue, Aug 20, 2013 at 10:28:58AM +0200, Johannes Berg wrote: > Something like the patch below, perhaps? Completely untested so far. Yeah, this one seems to fix it here (I was seeing the same lockdep splat as Hugh). Thanks. -- Regards/Gruss, Boris. Sent from a fat crate under my desk. For

Re: 3.11-rc6 genetlink locking fix offends lockdep

2013-08-20 Thread Johannes Berg
On Mon, 2013-08-19 at 11:52 -0700, Hugh Dickins wrote: > > > > We could use the semaphore instead, I believe, but I don't really > > > > understand the mutex vs. semaphore well enough to be sure that's > > > > correct. > > I don't believe so, the semaphore and cb_mutex don't have a dependency > >

Re: 3.11-rc6 genetlink locking fix offends lockdep

2013-08-19 Thread Hugh Dickins
On Mon, 19 Aug 2013, Johannes Berg wrote: > On Mon, 2013-08-19 at 19:00 +0800, Ding Tianhong wrote: > > On 2013/8/19 16:00, Johannes Berg wrote: > > > > > >> 3.11-rc6's commit 58ad436fcf49 ("genetlink: fix family dump race") > > >> gives me the lockdep trace below at startup. > > > > > > Hmm. Yes

Re: 3.11-rc6 genetlink locking fix offends lockdep

2013-08-19 Thread Johannes Berg
On Mon, 2013-08-19 at 19:00 +0800, Ding Tianhong wrote: > On 2013/8/19 16:00, Johannes Berg wrote: > > > >> 3.11-rc6's commit 58ad436fcf49 ("genetlink: fix family dump race") > >> gives me the lockdep trace below at startup. > > > > Hmm. Yes, I see now how this happens, not sure why I didn't run

Re: 3.11-rc6 genetlink locking fix offends lockdep

2013-08-19 Thread Ding Tianhong
On 2013/8/19 16:00, Johannes Berg wrote: > >> 3.11-rc6's commit 58ad436fcf49 ("genetlink: fix family dump race") >> gives me the lockdep trace below at startup. > > Hmm. Yes, I see now how this happens, not sure why I didn't run into it. > > The problem is that genl_family_rcv_msg() is called wi

Re: 3.11-rc6 genetlink locking fix offends lockdep

2013-08-19 Thread Johannes Berg
> 3.11-rc6's commit 58ad436fcf49 ("genetlink: fix family dump race") > gives me the lockdep trace below at startup. Hmm. Yes, I see now how this happens, not sure why I didn't run into it. The problem is that genl_family_rcv_msg() is called with the genl_lock held, and then calls netlink_dump_st

3.11-rc6 genetlink locking fix offends lockdep

2013-08-18 Thread Hugh Dickins
3.11-rc6's commit 58ad436fcf49 ("genetlink: fix family dump race") gives me the lockdep trace below at startup. I think it needs to be reverted until you can refine it. And it has already gone into today's stable review series, as 04/12 for 3.0.92, 26/34 for 3.4.59, 18/45 for 3.10.8: I raise an o