From: akpm@linux-foundation.org
To: oleg@redhat.com, ebiederm@xmission.com, gorcunov@openvz.org,
kirill.shutemov@linux.intel.com, mm-commits@vger.kernel.org
Subject: [merged] fs-proc-task_mmuc-cleanup-the-tail_vma-horror-in-m_next.patch removed from -mm tree
Date: Mon, 13 Oct 2014 11:18:04 -0700 [thread overview]
Message-ID: <543c175c.zFcppikcrs5wAzse%akpm@linux-foundation.org> (raw)
The patch titled
Subject: fs/proc/task_mmu.c: cleanup the "tail_vma" horror in m_next()
has been removed from the -mm tree. Its filename was
fs-proc-task_mmuc-cleanup-the-tail_vma-horror-in-m_next.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Oleg Nesterov <oleg@redhat.com>
Subject: fs/proc/task_mmu.c: cleanup the "tail_vma" horror in m_next()
1. Kill the first "vma != NULL" check. Firstly this is not possible,
m_next() won't be called if ->start() or the previous ->next()
returns NULL.
And if it was possible the 2nd "vma != tail_vma" check is buggy,
we should not wrongly return ->tail_vma.
2. Make this function readable. The logic is very simple, we should
return check "vma != tail" once and return "vm_next || tail_vma".
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/proc/task_mmu.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff -puN fs/proc/task_mmu.c~fs-proc-task_mmuc-cleanup-the-tail_vma-horror-in-m_next fs/proc/task_mmu.c
--- a/fs/proc/task_mmu.c~fs-proc-task_mmuc-cleanup-the-tail_vma-horror-in-m_next
+++ a/fs/proc/task_mmu.c
@@ -210,15 +210,13 @@ out:
static void *m_next(struct seq_file *m, void *v, loff_t *pos)
{
struct proc_maps_private *priv = m->private;
- struct vm_area_struct *vma = v;
struct vm_area_struct *tail_vma = priv->tail_vma;
- struct vm_area_struct *next;
+ struct vm_area_struct *vma = v, *next = NULL;
(*pos)++;
- if (vma && (vma != tail_vma) && vma->vm_next)
- return vma->vm_next;
+ if (vma != tail_vma)
+ next = vma->vm_next ?: tail_vma;
- next = (vma != tail_vma) ? tail_vma : NULL;
if (!next)
vma_stop(priv);
return next;
_
Patches currently in -mm which might be from oleg@redhat.com are
origin.patch
signal-use-build_bug-instead-of-_nsig_words_is_unsupported_size.patch
signal-use-build_bug-instead-of-_nsig_words_is_unsupported_sizefix.patch
coredump-add-%i-%i-in-core_pattern-to-report-the-tid-of-the-crashed-thread.patch
ipc-shm-kill-the-historical-wrong-mm-start_stack-check.patch
linux-next.patch
reply other threads:[~2014-10-13 18:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=543c175c.zFcppikcrs5wAzse%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=gorcunov@openvz.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=oleg@redhat.com \
/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.