[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8c043f4e-76e7-0b0b-dda8-c85623709f1f@canonical.com>
Date: Wed, 20 Oct 2021 12:09:49 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To: Tang Bin <tangbin@...s.chinamobile.com>, vz@...ia.com,
herbert@...dor.apana.org.au, davem@...emloft.net
Cc: linux-crypto@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: s5p-sss - Add error handling in s5p_aes_probe()
On 20/10/2021 12:03, Tang Bin wrote:
> The function s5p_aes_probe() does not perform sufficient error
> checking after executing platform_get_resource(), thus fix it.
>
> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
> ---
> drivers/crypto/s5p-sss.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
> index 55aa3a711..7717e9e59 100644
> --- a/drivers/crypto/s5p-sss.c
> +++ b/drivers/crypto/s5p-sss.c
> @@ -2171,6 +2171,8 @@ static int s5p_aes_probe(struct platform_device *pdev)
>
> variant = find_s5p_sss_version(pdev);
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + if (!res)
> + return -EINVAL;
>
> /*
> * Note: HASH and PRNG uses the same registers in secss, avoid
>
You need fixes and cc-stable:
Fixes: c2afad6c6105 ("crypto: s5p-sss - Add HASH support for Exynos")
Cc: <stable@...r.kernel.org>
With above added:
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
Best regards,
Krzysztof
Powered by blists - more mailing lists