Skip to content

Commit def7343

Browse files
legionusebiederm
authored andcommitted
ipc: Use the same namespace to modify and validate
In the 1f5c135 ("ipc: Store ipc sysctls in the ipc namespace") I missed that in addition to the modification of sem_ctls[3], the change is validated. This validation must occur in the same namespace. Link: https://lore.kernel.org/lkml/[email protected]/ Fixes: 1f5c135 ("ipc: Store ipc sysctls in the ipc namespace") Signed-off-by: Alexey Gladkov <[email protected]> Link: https://lkml.kernel.org/r/b3cb9a25cce6becbef77186bc1216071a08a969b.1651584847.git.legion@kernel.org Signed-off-by: Eric W. Biederman <[email protected]>
1 parent 1f5c135 commit def7343

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ipc/ipc_sysctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
6868
ret = proc_dointvec(table, write, buffer, lenp, ppos);
6969

7070
if (!ret)
71-
ret = sem_check_semmni(current->nsproxy->ipc_ns);
71+
ret = sem_check_semmni(ns);
7272

7373
/*
7474
* Reset the semmni value if an error happens.

0 commit comments

Comments
 (0)