aboutsummaryrefslogtreecommitdiff
path: root/net/unix/sysctl_net_unix.c
diff options
context:
space:
mode:
authorPaul Menage <[email protected]>2008-06-12 15:21:49 -0700
committerLinus Torvalds <[email protected]>2008-06-12 18:05:41 -0700
commit6c826818ff55eae7702b778b5f8bdf765af3b2af (patch)
treedab51aca0d7b86ccdc820894a96fad163f3fcb91 /net/unix/sysctl_net_unix.c
parentbcf8039ed45f56013c4afea5520bca7d909e5e61 (diff)
/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 <[email protected]> Cc: Nadia Derbey <[email protected]> Cc: Manfred Spraul <[email protected]> Cc: Pierre Peiffer <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions