From: Alexey Dobriyan <adobriyan@gmail.com>
To: sethjenkins@google.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>,
linux-mm@kvack.org, stable@vger.kernel.org
Subject: Re: [PATCH] mm: /proc/pid/smaps_rollup: fix no vma's null-deref
Date: Tue, 4 Oct 2022 15:53:41 +0300 [thread overview]
Message-ID: <Yzws1f1ghsifXvGu@localhost.localdomain> (raw)
In-Reply-To: <20221003224531.1930646-1-sethjenkins@google.com>
On Mon, Oct 03, 2022 at 06:45:31PM -0400, FirstName LastName wrote:
> From: Seth Jenkins <sethjenkins@google.com>
>
> Commit 258f669e7e88 ("mm: /proc/pid/smaps_rollup: convert to single value
> seq_file") introduced a null-deref if there are no vma's in the task in
> show_smaps_rollup.
>
> Fixes: 258f669e7e88 ("mm: /proc/pid/smaps_rollup: convert to single value seq_file")
> Cc: stable@vger.kernel.org
> Signed-off-by: Seth Jenkins <sethjenkins@google.com>
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -969,7 +969,7 @@ static int show_smaps_rollup(struct seq_file *m, void *v)
> vma = vma->vm_next;
> }
>
> - show_vma_header_prefix(m, priv->mm->mmap->vm_start,
> + show_vma_header_prefix(m, priv->mm->mmap ? priv->mm->mmap->vm_start : 0,
> last_vma_end, 0, 0, 0, 0);
> seq_pad(m, ' ');
> seq_puts(m, "[rollup]\n");
Reviewed-by: Alexey Dobriyan <adobriyan@gmail.com>
Tested-by: Alexey Dobriyan <adobriyan@gmail.com>
Now I know how to create stable process without address space.
next prev parent reply other threads:[~2022-10-04 12:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-03 22:45 [PATCH] mm: /proc/pid/smaps_rollup: fix no vma's null-deref FirstName LastName
2022-10-04 12:53 ` Alexey Dobriyan [this message]
2022-10-04 18:46 ` Andrew Morton
2022-10-04 21:05 ` Seth Jenkins
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=Yzws1f1ghsifXvGu@localhost.localdomain \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jannh@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sethjenkins@google.com \
--cc=stable@vger.kernel.org \
--cc=vbabka@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.