On 12/9/18 9:50 AM, Jens Axboe wrote:
On 12/9/18 9:58 AM, Guenter Roeck wrote:
On Sun, Dec 09, 2018 at 07:26:47AM -0700, Jens Axboe wrote:
Ming that lockdep spews the following trace. What this essentially says
is that the sbitmap swap_lock was used inconsistently in IRQ enabled
and disabled context, and that is usually indicative of a bug that will
cause a deadlock.
For this case, it's a false positive. The swap_lock is used from process
context only, when we swap the bits in the word and cleared mask. We
also end up doing that when we are getting a driver tag, from the
blk_mq_mark_tag_wait(), and from there we hold the waitqueue lock with
IRQs disabled. However, this isn't from an actual IRQ, it's still
process context.
Mark the swap_lock as not needing validation to silence this warning.
checkpatch says:
$ scripts/checkpatch.pl jens2
ERROR: lockdep_no_validate class is reserved for device->mutex.
#357: FILE: lib/sbitmap.c:68:
+ lockdep_set_novalidate_class(&sb->map[i].swap_lock);
... which I think explains the warning I am seeing with this patch applied.
Try the other patch I sent out earlier, that should work.
Ok, I am lost. No idea which patch you refer to. I'll just wait for the problem
to disappear from -next, or report it again if it shows up in mainline.
Thanks,
Guenter