* [PATCH] dma-pool: Fix an uninitialized variable bug in atomic_pool_expand()
@ 2020-08-26 11:33 Dan Carpenter
2020-08-27 7:22 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-08-26 11:33 UTC (permalink / raw)
To: Christoph Hellwig, Nicolas Saenz Julienne
Cc: kernel-janitors, iommu, Robin Murphy, linux-kernel
The "page" pointer can be used with out being initialized.
Fixes: d7e673ec2c8e ("dma-pool: Only allocate from CMA when in same memory zone")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
kernel/dma/pool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c
index 06582b488e31..1281c0f0442b 100644
--- a/kernel/dma/pool.c
+++ b/kernel/dma/pool.c
@@ -84,7 +84,7 @@ static int atomic_pool_expand(struct gen_pool *pool, size_t pool_size,
gfp_t gfp)
{
unsigned int order;
- struct page *page;
+ struct page *page = NULL;
void *addr;
int ret = -ENOMEM;
--
2.28.0
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dma-pool: Fix an uninitialized variable bug in atomic_pool_expand()
2020-08-26 11:33 [PATCH] dma-pool: Fix an uninitialized variable bug in atomic_pool_expand() Dan Carpenter
@ 2020-08-27 7:22 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2020-08-27 7:22 UTC (permalink / raw)
To: Dan Carpenter
Cc: kernel-janitors, linux-kernel, iommu, Robin Murphy, Christoph Hellwig
Thanks,
applied to the dma-mapping for-linux tree.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-27 7:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26 11:33 [PATCH] dma-pool: Fix an uninitialized variable bug in atomic_pool_expand() Dan Carpenter
2020-08-27 7:22 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).