[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8fd63a84-0fd1-4596-a9da-913e9c8eb110@stanley.mountain>
Date: Sat, 5 Apr 2025 19:16:16 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Wentao Liang <vulab@...as.ac.cn>
Cc: gregkh@...uxfoundation.org, philipp.g.hortmann@...il.com,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH v4] staging: rtl8723bs: Add error handling for sd_read()
On Sun, Apr 06, 2025 at 12:05:46AM +0800, Wentao Liang wrote:
> The sdio_read32() calls sd_read(), but does not handle the error if
> sd_read() fails. This could lead to subsequent operations processing
> invalid data. A proper implementation can be found in sdio_readN().
>
> Add error handling for the sd_read() to free tmpbuf and return error
> code if sd_read() fails. This ensure that the memcpy() is only performed
> when the read operation is successful.
>
> Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
> Cc: stable@...r.kernel.org # v4.12+
> Signed-off-by: Wentao Liang <vulab@...as.ac.cn>
> ---
> v4: Add change log and fix error code
> v3: Add Cc flag
> v2: Change code to initialize val
>
Thanks!
Reviewed-by: Dan Carpenter <dan.carpenter@...aro.org>
regards,
dan carpenter
Powered by blists - more mailing lists