lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 7 Jan 2022 07:26:16 +0000
From:   <Tudor.Ambarus@...rochip.com>
To:     <yangyingliang@...wei.com>, <linux-kernel@...r.kernel.org>,
        <dmaengine@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>
CC:     <Ludovic.Desroches@...rochip.com>, <vkoul@...nel.org>
Subject: Re: [PATCH -next] dmaengine: at_xdmac: Fix missing unlock in
 at_xdmac_tasklet()

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@...wei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.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@...rochip.com>

> +       }
> 
>         if (atchan->irq_status & error_mask)
>                 at_xdmac_handle_error(atchan);
> --
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ