[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1899144.GIZL8RDvWl@amdc3058>
Date: Fri, 17 Mar 2017 18:57:28 +0100
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
Vladimir Zapolskiy <vz@...ia.com>,
Nathan Royce <nroycea+kernel@...il.com>,
"# v4 . 10 . x" <stable@...r.kernel.org>
Subject: Re: [PATCH 1/4] crypto: s5p-sss - Close possible race for completed
requests
On Friday, March 17, 2017 04:49:19 PM Krzysztof Kozlowski wrote:
> Driver is capable of handling only one request at a time and it stores
> it in its state container struct s5p_aes_dev. This stored request must be
> protected between concurrent invocations (e.g. completing current
> request and scheduling new one). Combination of lock and "busy" field
> is used for that purpose.
>
> When "busy" field is true, the driver will not accept new request thus
> it will not overwrite currently handled data.
>
> However commit 28b62b145868 ("crypto: s5p-sss - Fix spinlock recursion
> on LRW(AES)") moved some of the write to "busy" field out of a lock
> protected critical section. This might lead to potential race between
> completing current request and scheduling a new one. Effectively the
> request completion might try to operate on new crypto request.
>
> Cc: <stable@...r.kernel.org> # v4.10.x
> Fixes: 28b62b145868 ("crypto: s5p-sss - Fix spinlock recursion on LRW(AES)")
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Powered by blists - more mailing lists