[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YXAHxNWkttb0V6BV@kroah.com>
Date: Wed, 20 Oct 2021 14:12:52 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Tang Bin <tangbin@...s.chinamobile.com>
Cc: krzysztof.kozlowski@...onical.com, vz@...ia.com,
herbert@...dor.apana.org.au, davem@...emloft.net,
linux-crypto@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2] crypto: s5p-sss - Add error handling in
s5p_aes_probe()
On Wed, Oct 20, 2021 at 07:06:24PM +0800, Tang Bin wrote:
> The function s5p_aes_probe() does not perform sufficient error
> checking after executing platform_get_resource(), thus fix it.
>
> Fixes: c2afad6c6105 ("crypto: s5p-sss - Add HASH support for Exynos")
> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
> ---
> Changes from v1
> - add fixed title
> ---
> 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
> --
> 2.20.1.windows.1
>
>
>
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
Powered by blists - more mailing lists