* [PATCH -next] dmaengine: at_xdmac: Fix missing unlock in at_xdmac_tasklet()
@ 2022-01-07 2:40 Yang Yingliang
2022-01-07 7:26 ` Tudor.Ambarus
2022-02-15 5:26 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2022-01-07 2:40 UTC (permalink / raw)
To: linux-kernel, dmaengine, linux-arm-kernel
Cc: ludovic.desroches, tudor.ambarus, vkoul
Add the missing unlock before return from at_xdmac_tasklet().
Fixes: e77e561925df ("dmaengine: at_xdmac: Fix race over irq_status")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/dma/at_xdmac.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index a1da2b4b6d73..1476156af74b 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -1681,8 +1681,10 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
__func__, atchan->irq_status);
if (!(atchan->irq_status & AT_XDMAC_CIS_LIS) &&
- !(atchan->irq_status & error_mask))
+ !(atchan->irq_status & error_mask)) {
+ spin_unlock_irq(&atchan->lock);
return;
+ }
if (atchan->irq_status & error_mask)
at_xdmac_handle_error(atchan);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] dmaengine: at_xdmac: Fix missing unlock in at_xdmac_tasklet()
2022-01-07 2:40 [PATCH -next] dmaengine: at_xdmac: Fix missing unlock in at_xdmac_tasklet() Yang Yingliang
@ 2022-01-07 7:26 ` Tudor.Ambarus
2022-02-15 5:26 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Tudor.Ambarus @ 2022-01-07 7:26 UTC (permalink / raw)
To: yangyingliang, linux-kernel, dmaengine, linux-arm-kernel
Cc: Ludovic.Desroches, vkoul
On 1/7/22 4:40 AM, Yang Yingliang wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> Add the missing unlock before return from at_xdmac_tasklet().
>
> Fixes: e77e561925df ("dmaengine: at_xdmac: Fix race over irq_status")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/dma/at_xdmac.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> index a1da2b4b6d73..1476156af74b 100644
> --- a/drivers/dma/at_xdmac.c
> +++ b/drivers/dma/at_xdmac.c
> @@ -1681,8 +1681,10 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
> __func__, atchan->irq_status);
>
> if (!(atchan->irq_status & AT_XDMAC_CIS_LIS) &&
> - !(atchan->irq_status & error_mask))
> + !(atchan->irq_status & error_mask)) {
> + spin_unlock_irq(&atchan->lock);
> return;
oh yes, thanks!
you can directly return spin_unlock_irq(&atchan->lock); to avoid the extra braces.
Anyway, it's good:
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> + }
>
> if (atchan->irq_status & error_mask)
> at_xdmac_handle_error(atchan);
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] dmaengine: at_xdmac: Fix missing unlock in at_xdmac_tasklet()
2022-01-07 2:40 [PATCH -next] dmaengine: at_xdmac: Fix missing unlock in at_xdmac_tasklet() Yang Yingliang
2022-01-07 7:26 ` Tudor.Ambarus
@ 2022-02-15 5:26 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2022-02-15 5:26 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-kernel, dmaengine, linux-arm-kernel, ludovic.desroches,
tudor.ambarus
On 07-01-22, 10:40, Yang Yingliang wrote:
> Add the missing unlock before return from at_xdmac_tasklet().
Applied, thanks
>
> Fixes: e77e561925df ("dmaengine: at_xdmac: Fix race over irq_status")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/dma/at_xdmac.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> index a1da2b4b6d73..1476156af74b 100644
> --- a/drivers/dma/at_xdmac.c
> +++ b/drivers/dma/at_xdmac.c
> @@ -1681,8 +1681,10 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
> __func__, atchan->irq_status);
>
> if (!(atchan->irq_status & AT_XDMAC_CIS_LIS) &&
> - !(atchan->irq_status & error_mask))
> + !(atchan->irq_status & error_mask)) {
> + spin_unlock_irq(&atchan->lock);
> return;
> + }
>
> if (atchan->irq_status & error_mask)
> at_xdmac_handle_error(atchan);
> --
> 2.25.1
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-15 5:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 2:40 [PATCH -next] dmaengine: at_xdmac: Fix missing unlock in at_xdmac_tasklet() Yang Yingliang
2022-01-07 7:26 ` Tudor.Ambarus
2022-02-15 5:26 ` Vinod Koul
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).