[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 4 Apr 2023 06:22:50 -0700
From: Lars-Peter Clausen <lars@...afoo.de>
To: Paul Cercueil <paul@...pouillou.net>,
Nuno Sá <noname.nuno@...il.com>,
Jonathan Cameron <jic23@...nel.org>,
Vinod Koul <vkoul@...nel.org>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Christian König <christian.koenig@....com>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linaro-mm-sig@...ts.linaro.org,
dmaengine@...r.kernel.org, linux-media@...r.kernel.org
Subject: Re: [PATCH v3 07/11] iio: core: Add new DMABUF interface
infrastructure
On 4/4/23 00:55, Paul Cercueil wrote:
> [...]
>>> + priv = attach->importer_priv;
>>> + list_del_init(&priv->entry);
>>> +
>>> + iio_buffer_dmabuf_put(attach);
>>> + iio_buffer_dmabuf_put(attach);
>>> +
>> Is this intended? Looks suspicious...
> It is intended, yes. You want to release the dma_buf_attachment that's
> created in iio_buffer_attach_dmabuf(), and you need to call
> iio_buffer_find_attachment() to get a pointer to it, which also gets a
> second reference - so it needs to unref twice.
Let's add a comment documenting that.
Powered by blists - more mailing lists