All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Omar Sandoval <osandov@osandov.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Ming Lei <ming.lei@redhat.com>
Subject: Re: [PATCH] sbitmap: silence bogus lockdep IRQ warning
Date: Sun, 9 Dec 2018 10:50:50 -0700	[thread overview]
Message-ID: <f57e00fe-9f59-e1c2-2af3-8c41ebe1fe51@kernel.dk> (raw)
In-Reply-To: <20181209165847.GA31213@roeck-us.net>

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.

-- 
Jens Axboe


  reply	other threads:[~2018-12-09 17:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-09 16:58 [PATCH] sbitmap: silence bogus lockdep IRQ warning Guenter Roeck
2018-12-09 17:50 ` Jens Axboe [this message]
2018-12-09 18:01   ` Guenter Roeck
2018-12-09 18:14     ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2018-12-09 14:26 Jens Axboe
2018-12-09 14:51 ` Guenter Roeck
2018-12-09 14:58   ` Jens Axboe
2018-12-09 16:53     ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f57e00fe-9f59-e1c2-2af3-8c41ebe1fe51@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=ming.lei@redhat.com \
    --cc=osandov@osandov.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.