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 Cryptography]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]

  Powered by Linux