[PATCH] nvme-pci: silence a lockdep complaint

Sagi Grimberg sagi at grimberg.me
Wed May 22 11:00:34 PDT 2024



On 22/05/2024 19:28, Christoph Hellwig wrote:
> On Wed, May 22, 2024 at 10:12:19AM -0600, Keith Busch wrote:
>>> Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>
>> This is not desireable, but I give up trying to appease lockdep for this
>> one.
> lockdep_off is a cure that's worth than the desease.

This is not ideal for sure.

>   If we can't
> explain the "can't happen" using lockdep classes I don't see how
> we could actually be sure that it can't happen.

I don't understand lockdep well enough to do that. This warning
exists for 6 months now. The conclusion that Keith came to (and I agreed)
is that it can't happen, because nvme_timeout handler will not disable the
device while the ctrl reset_work is running, the ctrl state machine will 
prevent
that from happening.

There was an attempt to convert namespaces_rwsem a srcu, but my comment to
that was that this is an intrusive change for a complaint that we think 
is a false-positive.

Do you see a proper way to solve this? Would love to see a better 
solution here.

The original report is at:
https://lore.kernel.org/linux-block/20220930001943.zdbvolc3gkekfmcv@shindev/ 




More information about the Linux-nvme mailing list