Re: usb storage lockdep report.

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

 



On Wed, 2012-03-14 at 13:20 -0400, Alan Stern wrote:
> I don't know how to prevent lockdep from complaining about this sort of 
> thing.  It can't lead to a genuine deadlock, because a thread never 
> tries to acquire more than one of these dev_mutex things unless it's 
> already holding the device lock.
> 
> Peter, any ideas? 

Sounds like you want: 

  mutex_lock_nest_lock(&us->dev_mutex, &device->mutex);

That tells lockdep you can hold multiple us->dev_mutex instances if
you're holding device->mutex.

Proper consideration is needed since this annotation can annotate an
actual deadlock away, it does not verify device->mutex does indeed
serialize all such multiple-instance acquisitions. It takes your word
for it.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux