Re: [PATCH v3 071/114] lockdep: add lockdep_assert_not_held

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

 



On Tue, 1 Jul 2014 13:07:18 +0200
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> On Tue, Jul 01, 2014 at 06:41:11AM -0400, Jeff Layton wrote:
> > Right -- in the case of something like atomic_dec_and_lock, we only
> > take the spinlock if we think the count might go to zero. So, we might
> > miss catching some places that could deadlock if the refcounts don't go
> > to zero in the testing we're doing.
> > 
> > might_lock may be what we need, but I don't see any callers of it, 
> 
> might_fault()
>   might_lock_read(&current->mm->mmap_sem)
> 
> I'm not sure we have others; but this is the one I remember providing
> this for.
> 
> > and
> > at a quick glance it doesn't appear to be disabled if debug_locks is
> > false.
> 
> The whole of lockdep gets killed, and that would include the
> lock_acquire/lock_release used to implement these.

Ok, good. Let's just drop this patch then and I'll plan to use
might_lock instead of this call.

Thanks!
-- 
Jeff Layton <jlayton@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux