[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <78f35c6d-c7b5-f5c7-b658-00aac28674a5@nxp.com>
Date: Thu, 18 Nov 2021 09:57:46 +0200
From: Horia Geantă <horia.geanta@....com>
To: Gaurav Jain <gaurav.jain@....com>,
Pankaj Gupta <pankaj.gupta@....com>,
Varun Sethi <V.Sethi@....com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S . Miller" <davem@...emloft.net>,
Iuliana Prodan <iuliana.prodan@....com>
Cc: "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH] crypto: caam: fix descriptor error when create ext4 fs on
the device-mapper device
On 11/9/2021 11:51 AM, Gaurav Jain wrote:
> Root cause:
> When caam queue is full (-ENOSPC), caam frees descriptor memory.
> crypto-engine checks if retry support is true and h/w queue
> is full(-ENOSPC), then requeue the crypto request.
> During processing the requested descriptor again, caam gives below error.
> (caam_jr 30902000.jr: 40000006: DECO: desc idx 0: Invalid KEY Command).
>
> This patch adds a check to return when caam input ring is full
> and retry support is true. so descriptor memory is not freed
> and requeued request can be processed again.
>
This approach is fine for a fix, to keep it small.
IMO it would be better to modify caam driver to use the crypto_engine callbacks
(prepare_request, unprepare_request).
> Fixes: 2d653936eb2cf ("crypto: caam - enable crypto-engine retry mechanism")
> Signed-off-by: Gaurav Jain <gaurav.jain@....com>
> Reviewed-by: Horia Geantă <horia.geanta@....com>
Initial upstream patch submission should not carry the R-b tags gathered
during internal reviews.
Patch looks good, thanks.
However the subject should change to something more generic,
given the root cause.
Horia
Powered by blists - more mailing lists