All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] ipc-shm-guard-against-non-existant-vma-in-shmdt2.patch removed from -mm tree
@ 2013-09-12 19:51 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2013-09-12 19:51 UTC (permalink / raw)
  To: mm-commits, sedat.dilek, riel, manfred, davidlohr.bueso

Subject: [merged] ipc-shm-guard-against-non-existant-vma-in-shmdt2.patch removed from -mm tree
To: davidlohr.bueso@hp.com,manfred@colorfullife.com,riel@redhat.com,sedat.dilek@gmail.com,mm-commits@vger.kernel.org
From: akpm@linux-foundation.org
Date: Thu, 12 Sep 2013 12:51:01 -0700


The patch titled
     Subject: ipc, shm: guard against non-existant vma in shmdt(2)
has been removed from the -mm tree.  Its filename was
     ipc-shm-guard-against-non-existant-vma-in-shmdt2.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Davidlohr Bueso <davidlohr.bueso@hp.com>
Subject: ipc, shm: guard against non-existant vma in shmdt(2)

When !CONFIG_MMU there's a chance we can derefence a NULL pointer when the
VM area isn't found - check the return value of find_vma().

Also, remove the redundant -EINVAL return: retval is set to the proper
return code and *only* changed to 0, when we actually unmap the segments.

Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 ipc/shm.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -puN ipc/shm.c~ipc-shm-guard-against-non-existant-vma-in-shmdt2 ipc/shm.c
--- a/ipc/shm.c~ipc-shm-guard-against-non-existant-vma-in-shmdt2
+++ a/ipc/shm.c
@@ -1288,8 +1288,7 @@ SYSCALL_DEFINE1(shmdt, char __user *, sh
 #else /* CONFIG_MMU */
 	/* under NOMMU conditions, the exact address to be destroyed must be
 	 * given */
-	retval = -EINVAL;
-	if (vma->vm_start == addr && vma->vm_ops == &shm_vm_ops) {
+	if (vma && vma->vm_start == addr && vma->vm_ops == &shm_vm_ops) {
 		do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start);
 		retval = 0;
 	}
_

Patches currently in -mm which might be from davidlohr.bueso@hp.com are

origin.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-12 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-12 19:51 [merged] ipc-shm-guard-against-non-existant-vma-in-shmdt2.patch removed from -mm tree akpm

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.