public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Eric Biggers <ebiggers@kernel.org>, linux-block@vger.kernel.org
Cc: dm-devel@redhat.com
Subject: Re: [PATCH] blk-crypto: use dynamic lock class for blk_crypto_profile::lock
Date: Mon, 12 Jun 2023 10:45:05 -0700	[thread overview]
Message-ID: <a663fc71-3a06-f4bf-8451-1fbee328c2b6@acm.org> (raw)
In-Reply-To: <20230610061139.212085-1-ebiggers@kernel.org>

On 6/9/23 23:11, Eric Biggers wrote:
> When a device-mapper device is passing through the inline encryption
> support of an underlying device, calls to blk_crypto_evict_key() take
> the blk_crypto_profile::lock of the device-mapper device, then take the
> blk_crypto_profile::lock of the underlying device (nested).  This isn't
> a real deadlock, but it causes a lockdep report because there is only
> one lock class for all instances of this lock.
> 
> Lockdep subclasses don't really work here because the hierarchy of block
> devices is dynamic and could have more than 2 levels.
> 
> Instead, register a dynamic lock class for each blk_crypto_profile, and
> associate that with the lock.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

  reply	other threads:[~2023-06-12 17:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-10  6:11 [PATCH] blk-crypto: use dynamic lock class for blk_crypto_profile::lock Eric Biggers
2023-06-12 17:45 ` Bart Van Assche [this message]
2023-07-05 21:33 ` Eric Biggers
2023-07-05 21:48 ` Jens Axboe

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=a663fc71-3a06-f4bf-8451-1fbee328c2b6@acm.org \
    --to=bvanassche@acm.org \
    --cc=dm-devel@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=linux-block@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox