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] [day] [month] [year] [list]
Message-ID: <5cd213e377dbf6ff0fb24f92cefd0e4283375d17.camel@gmail.com>
Date: Fri, 14 Nov 2025 09:07:33 +0000
From: Nuno Sá <noname.nuno@...il.com>
To: Liang Jie <buaajxlj@....com>, Jonathan Cameron <jic23@...nel.org>, David
 Lechner <dlechner@...libre.com>, Nuno Sá
 <nuno.sa@...log.com>, Andy Shevchenko	 <andy@...nel.org>, "open list:IIO
 SUBSYSTEM AND DRIVERS"	 <linux-iio@...r.kernel.org>, open list
 <linux-kernel@...r.kernel.org>
Cc: liangjie@...iang.com, fanggeng@...iang.com, yangchen11@...iang.com
Subject: Re: [PATCH] iio: buffer: use dma_buf_unmap_attachment_unlocked()
 helper

On Fri, 2025-11-14 at 16:47 +0800, Liang Jie wrote:
> From: Liang Jie <liangjie@...iang.com>
> 
> Replace open-coded dma_resv_lock()/dma_resv_unlock() around
> dma_buf_unmap_attachment() in iio_buffer_dmabuf_release() with the
> dma_buf_unmap_attachment_unlocked() helper.
> 
> This aligns with the standard DMA-BUF API, avoids duplicating
> locking logic and eases future maintenance. No functional change.
> 
> Reviewed-by: fanggeng <fanggeng@...iang.com>
> Signed-off-by: Liang Jie <liangjie@...iang.com>
> ---

Reviewed-by: Nuno Sá <nuno.sa@...log.com>

>  drivers/iio/industrialio-buffer.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index a80f7cc25a27..58330abbf40a 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -1563,9 +1563,7 @@ static void iio_buffer_dmabuf_release(struct kref *ref)
>  	struct iio_buffer *buffer = priv->buffer;
>  	struct dma_buf *dmabuf = attach->dmabuf;
>  
> -	dma_resv_lock(dmabuf->resv, NULL);
> -	dma_buf_unmap_attachment(attach, priv->sgt, priv->dir);
> -	dma_resv_unlock(dmabuf->resv);
> +	dma_buf_unmap_attachment_unlocked(attach, priv->sgt, priv->dir);
>  
>  	buffer->access->detach_dmabuf(buffer, priv->block);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ