lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ba97a544-eef8-4e48-8c8c-fe73fff6ae15@collabora.com>
Date: Fri, 14 Jun 2024 12:09:04 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
 David Hildenbrand <david@...hat.com>
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>,
 Andrew Morton <akpm@...ux-foundation.org>,
 Matthew Wilcox <willy@...radead.org>, Andrei Vagin <avagin@...gle.com>,
 Ryan Roberts <ryan.roberts@....com>, Hugh Dickins <hughd@...gle.com>,
 Kefeng Wang <wangkefeng.wang@...wei.com>, linux-kernel@...r.kernel.org,
 linux-fsdevel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] fs/proc/task_mmu: fix uninitialized variable in
 pagemap_pmd_range()

On 6/13/24 7:34 PM, Dan Carpenter wrote:
> The "folio" pointer is tested for NULL, but it's either valid or
> uninitialized.  Initialize it to NULL.
> 
> Fixes: 84f57f8b8914 ("fs/proc: move page_mapcount() to fs/proc/internal.h")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
>  fs/proc/task_mmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 631371cb80a0..6ed1f56b32b4 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -1492,7 +1492,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
>  		u64 flags = 0, frame = 0;
>  		pmd_t pmd = *pmdp;
>  		struct page *page = NULL;
> -		struct folio *folio;
> +		struct folio *folio = NULL;
>  
>  		if (vma->vm_flags & VM_SOFTDIRTY)
>  			flags |= PM_SOFT_DIRTY;
Reviewed-by: Muhammad Usama Anjum <usama.anjum@...labora.com>

-- 
BR,
Muhammad Usama Anjum

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ