From: Manfred Spraul Date: Fri, 6 Jun 2014 21:37:40 +0000 (-0700) Subject: ipc/shm.c: check for overflows of shm_tot X-Git-Tag: omap-for-v3.16/fixes-against-rc1~91^2~4^2~57 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09c6eb1f651dad601f02435bbd79734954960c42;p=pandora-kernel.git 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 Acked-by: Davidlohr Bueso Acked-by: KOSAKI Motohiro Acked-by: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed