From eb66ec44f867834de054544b09b573de3a7ae456 Mon Sep 17 00:00:00 2001 From: Mathias Krause Date: Fri, 6 Jun 2014 14:37:36 -0700 Subject: 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 Cc: PaX Team Cc: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- ipc/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipc/util.h') 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 -- cgit v1.2.3-58-ga151