From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org, mtk.manpages@gmail.com,
kosaki.motohiro@jp.fujitsu.com, davidlohr@hp.com,
manfred@colorfullife.com
Subject: [merged] ipc-shmc-check-for-overflows-of-shm_tot.patch removed from -mm tree
Date: Mon, 09 Jun 2014 12:37:17 -0700 [thread overview]
Message-ID: <53960ced.dQJmetXcHHcxColy%akpm@linux-foundation.org> (raw)
Subject: [merged] ipc-shmc-check-for-overflows-of-shm_tot.patch removed from -mm tree
To: manfred@colorfullife.com,davidlohr@hp.com,kosaki.motohiro@jp.fujitsu.com,mtk.manpages@gmail.com,mm-commits@vger.kernel.org
From: akpm@linux-foundation.org
Date: Mon, 09 Jun 2014 12:37:17 -0700
The patch titled
Subject: ipc/shm.c: check for overflows of shm_tot
has been removed from the -mm tree. Its filename was
ipc-shmc-check-for-overflows-of-shm_tot.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Manfred Spraul <manfred@colorfullife.com>
Subject: ipc/shm.c: check for overflows of shm_tot
shm_tot counts the total number of pages used by shm segments.
If SHMALL is ULONG_MAX (or nearly ULONG_MAX), then the number can
overflow. Subsequent calls to shmctl(,SHM_INFO,) would return wrong
values for shm_tot.
The patch adds a detection for overflows.
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Davidlohr Bueso <davidlohr@hp.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
ipc/shm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN ipc/shm.c~ipc-shmc-check-for-overflows-of-shm_tot ipc/shm.c
--- a/ipc/shm.c~ipc-shmc-check-for-overflows-of-shm_tot
+++ a/ipc/shm.c
@@ -493,7 +493,8 @@ static int newseg(struct ipc_namespace *
if (size < SHMMIN || size > ns->shm_ctlmax)
return -EINVAL;
- if (ns->shm_tot + numpages > ns->shm_ctlall)
+ if (ns->shm_tot + numpages < ns->shm_tot ||
+ ns->shm_tot + numpages > ns->shm_ctlall)
return -ENOSPC;
shp = ipc_rcu_alloc(sizeof(*shp));
_
Patches currently in -mm which might be from manfred@colorfullife.com are
origin.patch
slab-leaks3-default-y.patch
reply other threads:[~2014-06-09 19:37 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=53960ced.dQJmetXcHHcxColy%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davidlohr@hp.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=mm-commits@vger.kernel.org \
--cc=mtk.manpages@gmail.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.