Re: [PATCH v5] blk-crypto: dynamically allocate fallback profile

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

 



On Thu, Aug 17, 2023 at 10:15:56AM -0400, Sweet Tea Dorminy wrote:
> blk_crypto_profile_init() calls lockdep_register_key(), which warns and
> does not register if the provided memory is a static object.
> blk-crypto-fallback currently has a static blk_crypto_profile and calls
> blk_crypto_profile_init() thereupon, resulting in the warning and
> failure to register.
> 
> Fortunately it is simple enough to use a dynamically allocated profile
> and make lockdep function correctly.
> 
> Fixes: 2fb48d88e77f ("blk-crypto: use dynamic lock class for blk_crypto_profile::lock")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@xxxxxxxxxx>
> ---
> v5: added correct error return if allocation fails.
> v4: removed a stray change introduced in v3.
> v3: added allocation error checking as noted by Eric Biggers.
> v2: reworded commit message, fixed Fixes tag, as pointed out by Eric
> Biggers.

Reviewed-by: Eric Biggers <ebiggers@xxxxxxxxxx>

Thanks,

- Eric



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux