summaryrefslogtreecommitdiffstats
path: root/ipc/util.h
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2014-06-06 14:37:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 16:08:14 -0700
commiteb66ec44f867834de054544b09b573de3a7ae456 (patch)
tree4fabad7ced4ce6145d44e8e25bd6ee111712e9f8 /ipc/util.h
parent3e4e0f0a8756dade3023d1f47d50fbced7749788 (diff)
downloadlinux-stable-eb66ec44f867834de054544b09b573de3a7ae456.tar.gz
linux-stable-eb66ec44f867834de054544b09b573de3a7ae456.tar.bz2
linux-stable-eb66ec44f867834de054544b09b573de3a7ae456.zip
ipc: constify ipc_ops
There is no need to recreate the very same ipc_ops structure on every kernel entry for msgget/semget/shmget. Just declare it static and be done with it. While at it, constify it as we don't modify the structure at runtime. Found in the PaX patch, written by the PaX Team. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: PaX Team <pageexec@freemail.hu> Cc: Davidlohr Bueso <davidlohr@hp.com> Cc: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/util.h')
-rw-r--r--ipc/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/util.h b/ipc/util.h
index 9c47d6f6c7b4..e1153ad574b7 100644
--- a/ipc/util.h
+++ b/ipc/util.h
@@ -201,7 +201,7 @@ static inline bool ipc_valid_object(struct kern_ipc_perm *perm)
struct kern_ipc_perm *ipc_obtain_object_check(struct ipc_ids *ids, int id);
int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids,
- struct ipc_ops *ops, struct ipc_params *params);
+ const struct ipc_ops *ops, struct ipc_params *params);
void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
void (*free)(struct ipc_namespace *, struct kern_ipc_perm *));
#endif