Re: [PATCH 1/3] blk-mq: release crypto keyslot before reporting I/O complete

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

 



On Thu, Mar 02, 2023 at 11:19:57PM -0800, Eric Biggers wrote:
> +void __blk_crypto_free_request(struct request *rq)
> +{
>  	mempool_free(rq->crypt_ctx, bio_crypt_ctx_pool);
> -	blk_crypto_rq_set_defaults(rq);
> +	rq->crypt_ctx = NULL;
> +
> +	/* The keyslot, if one was needed, should have been released earlier. */
> +	if (WARN_ON_ONCE(rq->crypt_keyslot))
> +		__blk_crypto_rq_put_keyslot(rq);
>  }

I received a report that this WARN_ON_ONCE can be hit.

To fix this, attempt_merge() will need to release the keyslot too.

- 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