From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
David Hildenbrand <david@redhat.com>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
Andrei Vagin <avagin@google.com>,
Ryan Roberts <ryan.roberts@arm.com>,
Hugh Dickins <hughd@google.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] fs/proc/task_mmu: fix uninitialized variable in pagemap_pmd_range()
Date: Fri, 14 Jun 2024 12:09:04 +0500 [thread overview]
Message-ID: <ba97a544-eef8-4e48-8c8c-fe73fff6ae15@collabora.com> (raw)
In-Reply-To: <9d6eaba7-92f8-4a70-8765-38a519680a87@moroto.mountain>
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@linaro.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@collabora.com>
--
BR,
Muhammad Usama Anjum
prev parent reply other threads:[~2024-06-14 7:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 14:34 [PATCH] fs/proc/task_mmu: fix uninitialized variable in pagemap_pmd_range() Dan Carpenter
2024-06-13 14:47 ` David Hildenbrand
2024-06-14 7:09 ` Muhammad Usama Anjum [this message]
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=ba97a544-eef8-4e48-8c8c-fe73fff6ae15@collabora.com \
--to=usama.anjum@collabora.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@google.com \
--cc=dan.carpenter@linaro.org \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ryan.roberts@arm.com \
--cc=wangkefeng.wang@huawei.com \
--cc=willy@infradead.org \
/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 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).