From: Oleg Nesterov <oleg@redhat.com>
To: Ben Wolsieffer <ben.wolsieffer@hefring.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Greg Ungerer <gerg@uclinux.org>,
Andrew Morton <akpm@linux-foundation.org>,
Giulio Benetti <giulio.benetti@benettiengineering.com>
Subject: Re: [PATCH] proc: nommu: /proc/<pid>/maps: release mmap read lock
Date: Fri, 15 Sep 2023 14:15:15 +0200 [thread overview]
Message-ID: <20230915121514.GA2768@redhat.com> (raw)
In-Reply-To: <20230914163019.4050530-2-ben.wolsieffer@hefring.com>
On 09/14, Ben Wolsieffer wrote:
>
> Fixes: 47fecca15c09 ("fs/proc/task_nommu.c: don't use priv->task->mm")
> Signed-off-by: Ben Wolsieffer <ben.wolsieffer@hefring.com>
> ---
> fs/proc/task_nommu.c | 27 +++++++++++++++------------
> 1 file changed, 15 insertions(+), 12 deletions(-)
Acked-by: Oleg Nesterov <oleg@redhat.com>
-------------------------------------------------------------------------------
Sorry for the offtopic question. I know NOTHING about nommu and when I tried to
review this patch I was puzzled by
/* See m_next(). Zero at the start or after lseek. */
if (addr == -1UL)
return NULL;
at the start of m_start(). OK, lets look at
static void *m_next(struct seq_file *m, void *_p, loff_t *pos)
{
struct vm_area_struct *vma = _p;
*pos = vma->vm_end;
return find_vma(vma->vm_mm, vma->vm_end);
}
where does this -1UL come from? Does this mean that on nommu
last_vma->vm_end == -1UL
or what?
fs/proc/task_mmu.c has the same check at the start, but in this case
the "See m_next()" comment actually helps.
Just curious, thanks.
Oleg.
next prev parent reply other threads:[~2023-09-15 12:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-14 16:30 [PATCH] proc: nommu: /proc/<pid>/maps: release mmap read lock Ben Wolsieffer
2023-09-14 17:02 ` Andrew Morton
2023-09-14 17:30 ` Ben Wolsieffer
2023-09-15 15:42 ` Ben Wolsieffer
2023-09-15 12:15 ` Oleg Nesterov [this message]
2023-09-15 15:44 ` Ben Wolsieffer
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=20230915121514.GA2768@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=ben.wolsieffer@hefring.com \
--cc=gerg@uclinux.org \
--cc=giulio.benetti@benettiengineering.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).