linux/ipc
Andrey Vagin fdf538ce50 ipc: always handle a new value of auto_msgmni
commit 1195d94e00 upstream.

proc_dointvec_minmax() returns zero if a new value has been set.  So we
don't need to check all charecters have been handled.

Below you can find two examples.  In the new value has not been handled
properly.

$ strace ./a.out
open("/proc/sys/kernel/auto_msgmni", O_WRONLY) = 3
write(3, "0\n\0", 3)                    = 2
close(3)                                = 0
exit_group(0)
$ cat /sys/kernel/debug/tracing/trace

$strace ./a.out
open("/proc/sys/kernel/auto_msgmni", O_WRONLY) = 3
write(3, "0\n", 2)                      = 2
close(3)                                = 0

$ cat /sys/kernel/debug/tracing/trace
a.out-697   [000] ....  3280.998235: unregister_ipcns_notifier <-proc_ipcauto_dointvec_minmax

Fixes: 9eefe520c8 ("ipc: do not use a negative value to re-enable msgmni automatic recomputin")
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Cc: Mathias Krause <minipli@googlemail.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Joe Perches <joe@perches.com>
Cc: Davidlohr Bueso <davidlohr@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-21 09:23:04 -08:00
..
Makefile Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
compat.c ipc: fix compat msgrcv with negative msgtyp 2014-01-27 21:02:40 -08:00
compat_mq.c ipc: whitespace cleanup 2014-01-27 21:02:39 -08:00
ipc_sysctl.c ipc: always handle a new value of auto_msgmni 2014-11-21 09:23:04 -08:00
ipcns_notifier.c ipc: do not use a negative value to re-enable msgmni automatic recomputing 2008-07-25 10:53:42 -07:00
mq_sysctl.c ipc,mqueue: remove limits for the amount of system-wide queues 2014-02-25 15:25:45 -08:00
mqueue.c ipc,mqueue: remove limits for the amount of system-wide queues 2014-02-25 15:25:45 -08:00
msg.c ipc: Fix 2 bugs in msgrcv() MSG_COPY implementation 2014-03-16 10:41:04 -07:00
msgutil.c ipc, msg: fix message length check for negative values 2013-11-13 12:09:36 +09:00
namespace.c ipc: drop ipc_lock_by_ptr 2013-09-11 15:59:44 -07:00
sem.c ipc: remove braces for single statements 2014-01-27 21:02:39 -08:00
shm.c ipc: standardize code comments 2014-01-27 21:02:39 -08:00
syscall.c get rid of union semop in sys_semctl(2) arguments 2013-03-05 15:14:16 -05:00
util.c ipc: delete seq_max field in struct ipc_ids 2014-01-27 21:02:40 -08:00
util.h ipc: delete seq_max field in struct ipc_ids 2014-01-27 21:02:40 -08:00