Re: [PATCH v4 5/6] ipc: Clamp semmni to the real IPCMNI limit

2018-03-12 Thread Waiman Long
On 03/12/2018 04:52 PM, Luis R. Rodriguez wrote: > On Mon, Mar 12, 2018 at 04:15:43PM -0400, Waiman Long wrote: >> +if (clamped) >> +pr_warn_once("sysctl: \"sem[3]\" was set out of range [%d, %d], >> clamped to %d.\n", >> + 0, IPCMNI, ns->sc_semmni); > Why

Re: [PATCH v4 5/6] ipc: Clamp semmni to the real IPCMNI limit

2018-03-12 Thread Waiman Long
On 03/12/2018 04:52 PM, Luis R. Rodriguez wrote: > On Mon, Mar 12, 2018 at 04:15:43PM -0400, Waiman Long wrote: >> +if (clamped) >> +pr_warn_once("sysctl: \"sem[3]\" was set out of range [%d, %d], >> clamped to %d.\n", >> + 0, IPCMNI, ns->sc_semmni); > Why

Re: [PATCH v4 5/6] ipc: Clamp semmni to the real IPCMNI limit

2018-03-12 Thread Luis R. Rodriguez
On Mon, Mar 12, 2018 at 04:15:43PM -0400, Waiman Long wrote: > + if (clamped) > + pr_warn_once("sysctl: \"sem[3]\" was set out of range [%d, %d], > clamped to %d.\n", > + 0, IPCMNI, ns->sc_semmni); Why warn if the kernel already does that? If we can avoid

Re: [PATCH v4 5/6] ipc: Clamp semmni to the real IPCMNI limit

2018-03-12 Thread Luis R. Rodriguez
On Mon, Mar 12, 2018 at 04:15:43PM -0400, Waiman Long wrote: > + if (clamped) > + pr_warn_once("sysctl: \"sem[3]\" was set out of range [%d, %d], > clamped to %d.\n", > + 0, IPCMNI, ns->sc_semmni); Why warn if the kernel already does that? If we can avoid

[PATCH v4 5/6] ipc: Clamp semmni to the real IPCMNI limit

2018-03-12 Thread Waiman Long
This patch clamps the semmni value (fourth element of sem_ctls[] array) to within the [0, IPCMNI] range and prints a warning message once when an out-of-range value is being written. Signed-off-by: Waiman Long --- ipc/ipc_sysctl.c | 13 - ipc/sem.c| 28

[PATCH v4 5/6] ipc: Clamp semmni to the real IPCMNI limit

2018-03-12 Thread Waiman Long
This patch clamps the semmni value (fourth element of sem_ctls[] array) to within the [0, IPCMNI] range and prints a warning message once when an out-of-range value is being written. Signed-off-by: Waiman Long --- ipc/ipc_sysctl.c | 13 - ipc/sem.c| 28