From: David Hildenbrand <david@redhat.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
Muhammad Usama Anjum <usama.anjum@collabora.com>,
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: Thu, 13 Jun 2024 16:47:04 +0200 [thread overview]
Message-ID: <895c6ff2-9b8c-4d35-b75c-8d0287d12233@redhat.com> (raw)
In-Reply-To: <9d6eaba7-92f8-4a70-8765-38a519680a87@moroto.mountain>
On 13.06.24 16:34, 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;
Acked-by: David Hildenbrand <david@redhat.com>
Thanks!
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2024-06-13 14:47 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 [this message]
2024-06-14 7:09 ` Muhammad Usama Anjum
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=895c6ff2-9b8c-4d35-b75c-8d0287d12233@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@google.com \
--cc=dan.carpenter@linaro.org \
--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=usama.anjum@collabora.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).