Skip to content

Commit

Permalink
dma-pool: Fix an uninitialized variable bug in atomic_pool_expand()
Browse files Browse the repository at this point in the history
commit 892fc9f upstream.

The "page" pointer can be used with out being initialized.

Fixes: d7e673e ("dma-pool: Only allocate from CMA when in same memory zone")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Sep 3, 2020
1 parent f880d69 commit a34b752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/dma/pool.c
Expand Up @@ -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;

Expand Down

0 comments on commit a34b752

Please sign in to comment.