[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aea1ed6da66c9ec8eaf8323f5b856feafc6de702.camel@mediatek.com>
Date: Thu, 25 Nov 2021 22:38:45 +0800
From: Kuan-Ying Lee <Kuan-Ying.Lee@...iatek.com>
To: "guangming.cao@...iatek.com" <guangming.cao@...iatek.com>,
"robin.murphy@....com" <robin.murphy@....com>
CC: "Brian.Starkey@....com" <Brian.Starkey@....com>,
"benjamin.gaignard@...aro.org" <benjamin.gaignard@...aro.org>,
"christian.koenig@....com" <christian.koenig@....com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"john.stultz@...aro.org" <john.stultz@...aro.org>,
"labbott@...hat.com" <labbott@...hat.com>,
"linaro-mm-sig@...ts.linaro.org" <linaro-mm-sig@...ts.linaro.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"lmark@...eaurora.org" <lmark@...eaurora.org>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"sumit.semwal@...aro.org" <sumit.semwal@...aro.org>,
wsd_upstream <wsd_upstream@...iatek.com>,
<kuan-ying.lee@...iatek.com>
Subject: Re: [PATCH v2] dma_heap: use for_each_sgtable_sg in sg_table
release flow
On Thu, 2021-11-25 at 21:49 +0800, guangming.cao@...iatek.com wrote:
> From: Guangming <Guangming.Cao@...iatek.com>
>
> Use (for_each_sgtable_sg) rather than (for_each_sg) to traverse
> sg_table to free sg_table.
> Use (for_each_sg) maybe will casuse some pages can't be freed
> when send wrong nents number.
s/casuse/cause
>
> Signed-off-by: Guangming <Guangming.Cao@...iatek.com>
> ---
> drivers/dma-buf/heaps/system_heap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-
> buf/heaps/system_heap.c
> index 23a7e74ef966..8660508f3684 100644
> --- a/drivers/dma-buf/heaps/system_heap.c
> +++ b/drivers/dma-buf/heaps/system_heap.c
> @@ -289,7 +289,7 @@ static void system_heap_dma_buf_release(struct
> dma_buf *dmabuf)
> int i;
>
> table = &buffer->sg_table;
> - for_each_sg(table->sgl, sg, table->nents, i) {
> + for_each_sgtable_sg(table, sg, i) {
> struct page *page = sg_page(sg);
>
> __free_pages(page, compound_order(page));
If this is a fix, I think we should add Fixes: xxxx ("...") in the
commit message and Cc stable.
Thanks,
Kuan-Ying Lee
Powered by blists - more mailing lists