From: Igor Klochko <igor.klochko@gmail.com>
To: hch@lst.de
Cc: iommu@lists.linux.dev, robin.murphy@arm.com, m.szyprowski@samsung.com
Subject: [PATCH] arch/arm/mm/dma-mapping.c: fix __alloc_from_pool returning a dirty buffer
Date: Fri, 23 Dec 2022 15:15:47 +0100 [thread overview]
Message-ID: <14dccd8c-e29a-fe93-5d4c-f0c3ff4f2430@gmail.com> (raw)
Hi,
A small patch for __alloc_from_pool to clean the buffer before returning.
---
arch/arm/mm/dma-mapping.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index c135f6e37a00..bb2bb3ab497a 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -366,6 +366,7 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page)
*ret_page = phys_to_page(phys);
ptr = (void *)val;
+ memset(ptr, 0, size);
}
return ptr;
--
2.39.0
Kind regards,
Igor Klochko
next reply other threads:[~2022-12-23 14:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-23 14:15 Igor Klochko [this message]
2022-12-23 14:39 ` [PATCH] arch/arm/mm/dma-mapping.c: fix __alloc_from_pool returning a dirty buffer Christoph Hellwig
2022-12-23 22:51 ` Igor Klochko
2022-12-23 22:51 ` Igor Klochko
2023-01-03 9:51 ` Russell King (Oracle)
2023-01-03 9:51 ` Russell King (Oracle)
2023-01-03 13:58 ` Robin Murphy
2023-01-03 13:58 ` Robin Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14dccd8c-e29a-fe93-5d4c-f0c3ff4f2430@gmail.com \
--to=igor.klochko@gmail.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.