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: Sun, 9 Jun 2024 19:20:49 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Olivier Dautricourt <olivierdautricourt@...il.com>,
 dmaengine@...r.kernel.org, Stefan Roese <sr@...x.de>,
 Vinod Koul <vkoul@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
 Eric Schwarz <eas@...optimization.com>
Subject: Re: [PATCH v2 2/3] dmaengine: altera-msgdma: cleanup after completing
 all descriptors

…
> This fixes a Sparse warning because we first take the lock in
> msgdma_tasklet.
…

Can the tag “Fixes” become relevant for the proposed change?


…
> +++ b/drivers/dma/altera-msgdma.c
> @@ -585,6 +585,8 @@ static void msgdma_chan_desc_cleanup(struct msgdma_device *mdev)
>  	struct msgdma_sw_desc *desc, *next;
>  	unsigned long irqflags;
>
> +	spin_lock_irqsave(&mdev->lock, irqflags);
> +
>  	list_for_each_entry_safe(desc, next, &mdev->done_list, node) {
>  		struct dmaengine_desc_callback cb;
>
> @@ -600,6 +602,8 @@ static void msgdma_chan_desc_cleanup(struct msgdma_device *mdev)
>  		/* Run any dependencies, then free the descriptor */
>  		msgdma_free_descriptor(mdev, desc);
>  	}
> +
> +	spin_unlock_irqrestore(&mdev->lock, irqflags);
>  }
…

Would you become interested to apply the guard “spinlock_irqsave”?
https://elixir.bootlin.com/linux/v6.10-rc2/source/include/linux/spinlock.h#L574

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ