Re: [PATCH] crypto/authenc: don't return -EBUSY when enqueuing the hash request

Mikulas Patocka
2025-11-25T14:02:19Z

On Tue, 23 Sep 2025, Herbert Xu wrote:

> On Tue, Sep 23, 2025 at 01:14:10PM +0200, Mikulas Patocka wrote:
> >
> > static void authenc_request_complete(struct aead_request *req, int err)
> > {
> > if (err != -EINPROGRESS)
> > aead_request_complete(req, err);
> > }
>
> Oh OK. That was kind of a hack which worked because authenc was
> used by IPsec only, so it didn't expect to be called with MAY_BACKLOG.
>
> Now that you're calling it with MAY_BACKLOG, we need to fix it to
> distinguish between an EINPROGRESS notification for EBUSY and one
> that's returned directly by an async function.
>
> Thanks,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Hi Herbert

What's the status of this bugfix? I searched the git history, but didn't
find it.

We have hit another deadlock in dm-crypt when using the "tegra-se" driver
(the driver returned -EBUSY, but didn't call the completion routine with
-EINPROGRESS), and I suspect that it may be this problem again.

Mikulas