From: Paul Menage Date: Thu, 12 Jun 2008 22:21:49 +0000 (-0700) Subject: /proc/sysvipc/shm: fix 32-bit truncation of segment sizes X-Git-Tag: v2.6.26-rc7~48 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c826818ff55eae7702b778b5f8bdf765af3b2af;p=pandora-kernel.git /proc/sysvipc/shm: fix 32-bit truncation of segment sizes sysvipc_shm_proc_show() picks between format strings (based on the expected maximum length of a SHM segment) in a way that prevents gcc from performing format checks on the seq_printf() parameters. This hid two format errors - shp->shm_segsz and shp->shm_nattach are both unsigned long, but were being printed as unsigned int and signed int respectively. This leads to 32-bit truncation of SHM segment sizes reported in /proc/sysvipc/shm. (And for nattach, but that's less of a problem for most users). This patch makes the format string directly visible to gcc's format specifier checker, and fixes the two broken format specifiers. Signed-off-by: Paul Menage Cc: Nadia Derbey Cc: Manfred Spraul Cc: Pierre Peiffer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed