linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] crypto: s5p-sss - Add error handling in s5p_aes_probe()
@ 2021-10-20 11:06 Tang Bin
  2021-10-20 11:38 ` Krzysztof Kozlowski
  2021-10-20 12:12 ` [PATCH v2] crypto: s5p-sss - Add error handling in s5p_aes_probe() Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Tang Bin @ 2021-10-20 11:06 UTC (permalink / raw)
  To: krzysztof.kozlowski, vz, herbert, davem
  Cc: linux-crypto, linux-samsung-soc, linux-kernel, stable, Tang Bin

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@cmss.chinamobile.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.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




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] crypto: s5p-sss - Add error handling in s5p_aes_probe()
  2021-10-20 11:06 [PATCH v2] crypto: s5p-sss - Add error handling in s5p_aes_probe() Tang Bin
@ 2021-10-20 11:38 ` Krzysztof Kozlowski
  2021-10-21  1:20   ` [PATCH v2] crypto: s5p-sss - Add error handling ins5p_aes_probe() tangbin
  2021-10-20 12:12 ` [PATCH v2] crypto: s5p-sss - Add error handling in s5p_aes_probe() Greg KH
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-10-20 11:38 UTC (permalink / raw)
  To: Tang Bin, vz, herbert, davem
  Cc: linux-crypto, linux-samsung-soc, linux-kernel, stable

On 20/10/2021 13:06, 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@cmss.chinamobile.com>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
> Changes from v1
>  - add fixed title
> ---
>  drivers/crypto/s5p-sss.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

You still missed the cc-stable tag. I pasted it last time.
Cc: <stable@vger.kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] crypto: s5p-sss - Add error handling in s5p_aes_probe()
  2021-10-20 11:06 [PATCH v2] crypto: s5p-sss - Add error handling in s5p_aes_probe() Tang Bin
  2021-10-20 11:38 ` Krzysztof Kozlowski
@ 2021-10-20 12:12 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-10-20 12:12 UTC (permalink / raw)
  To: Tang Bin
  Cc: krzysztof.kozlowski, vz, herbert, davem, linux-crypto,
	linux-samsung-soc, linux-kernel, stable

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@cmss.chinamobile.com>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] crypto: s5p-sss - Add error handling ins5p_aes_probe()
  2021-10-20 11:38 ` Krzysztof Kozlowski
@ 2021-10-21  1:20   ` tangbin
  0 siblings, 0 replies; 4+ messages in thread
From: tangbin @ 2021-10-21  1:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski, vz, herbert, davem
  Cc: linux-crypto, linux-samsung-soc, linux-kernel, stable

Hi, Krzysztof:

On 2021/10/20 19:38, Krzysztof Kozlowski wrote:
> On 20/10/2021 13:06, 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@cmss.chinamobile.com>
>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>> ---
>> Changes from v1
>>   - add fixed title
>> ---
>>   drivers/crypto/s5p-sss.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
> You still missed the cc-stable tag. I pasted it last time.
> Cc: <stable@vger.kernel.org>

I am deeply sorry for my patch v2,I thought it to cc when use git to 
send-email.

I am sorry to waste your precious time. I will correct it immediately.

Thanks

Tang Bin



> Best regards,
> Krzysztof



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-21  1:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 11:06 [PATCH v2] crypto: s5p-sss - Add error handling in s5p_aes_probe() Tang Bin
2021-10-20 11:38 ` Krzysztof Kozlowski
2021-10-21  1:20   ` [PATCH v2] crypto: s5p-sss - Add error handling ins5p_aes_probe() tangbin
2021-10-20 12:12 ` [PATCH v2] crypto: s5p-sss - Add error handling in s5p_aes_probe() Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).