diff options
-rw-r--r-- | ipc/msg.c | 10 | ||||
-rw-r--r-- | ipc/sem.c | 10 | ||||
-rw-r--r-- | ipc/shm.c | 10 |
3 files changed, 3 insertions, 27 deletions
@@ -272,20 +272,12 @@ static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp) | |||
272 | ipc_rcu_putref(&msq->q_perm, msg_rcu_free); | 272 | ipc_rcu_putref(&msq->q_perm, msg_rcu_free); |
273 | } | 273 | } |
274 | 274 | ||
275 | /* | ||
276 | * Called with msg_ids.rwsem and ipcp locked. | ||
277 | */ | ||
278 | static inline int msg_security(struct kern_ipc_perm *ipcp, int msgflg) | ||
279 | { | ||
280 | return security_msg_queue_associate(ipcp, msgflg); | ||
281 | } | ||
282 | |||
283 | SYSCALL_DEFINE2(msgget, key_t, key, int, msgflg) | 275 | SYSCALL_DEFINE2(msgget, key_t, key, int, msgflg) |
284 | { | 276 | { |
285 | struct ipc_namespace *ns; | 277 | struct ipc_namespace *ns; |
286 | static const struct ipc_ops msg_ops = { | 278 | static const struct ipc_ops msg_ops = { |
287 | .getnew = newque, | 279 | .getnew = newque, |
288 | .associate = msg_security, | 280 | .associate = security_msg_queue_associate, |
289 | }; | 281 | }; |
290 | struct ipc_params msg_params; | 282 | struct ipc_params msg_params; |
291 | 283 | ||
@@ -567,14 +567,6 @@ static int newary(struct ipc_namespace *ns, struct ipc_params *params) | |||
567 | /* | 567 | /* |
568 | * Called with sem_ids.rwsem and ipcp locked. | 568 | * Called with sem_ids.rwsem and ipcp locked. |
569 | */ | 569 | */ |
570 | static inline int sem_security(struct kern_ipc_perm *ipcp, int semflg) | ||
571 | { | ||
572 | return security_sem_associate(ipcp, semflg); | ||
573 | } | ||
574 | |||
575 | /* | ||
576 | * Called with sem_ids.rwsem and ipcp locked. | ||
577 | */ | ||
578 | static inline int sem_more_checks(struct kern_ipc_perm *ipcp, | 570 | static inline int sem_more_checks(struct kern_ipc_perm *ipcp, |
579 | struct ipc_params *params) | 571 | struct ipc_params *params) |
580 | { | 572 | { |
@@ -592,7 +584,7 @@ SYSCALL_DEFINE3(semget, key_t, key, int, nsems, int, semflg) | |||
592 | struct ipc_namespace *ns; | 584 | struct ipc_namespace *ns; |
593 | static const struct ipc_ops sem_ops = { | 585 | static const struct ipc_ops sem_ops = { |
594 | .getnew = newary, | 586 | .getnew = newary, |
595 | .associate = sem_security, | 587 | .associate = security_sem_associate, |
596 | .more_checks = sem_more_checks, | 588 | .more_checks = sem_more_checks, |
597 | }; | 589 | }; |
598 | struct ipc_params sem_params; | 590 | struct ipc_params sem_params; |
@@ -659,14 +659,6 @@ no_file: | |||
659 | /* | 659 | /* |
660 | * Called with shm_ids.rwsem and ipcp locked. | 660 | * Called with shm_ids.rwsem and ipcp locked. |
661 | */ | 661 | */ |
662 | static inline int shm_security(struct kern_ipc_perm *ipcp, int shmflg) | ||
663 | { | ||
664 | return security_shm_associate(ipcp, shmflg); | ||
665 | } | ||
666 | |||
667 | /* | ||
668 | * Called with shm_ids.rwsem and ipcp locked. | ||
669 | */ | ||
670 | static inline int shm_more_checks(struct kern_ipc_perm *ipcp, | 662 | static inline int shm_more_checks(struct kern_ipc_perm *ipcp, |
671 | struct ipc_params *params) | 663 | struct ipc_params *params) |
672 | { | 664 | { |
@@ -684,7 +676,7 @@ SYSCALL_DEFINE3(shmget, key_t, key, size_t, size, int, shmflg) | |||
684 | struct ipc_namespace *ns; | 676 | struct ipc_namespace *ns; |
685 | static const struct ipc_ops shm_ops = { | 677 | static const struct ipc_ops shm_ops = { |
686 | .getnew = newseg, | 678 | .getnew = newseg, |
687 | .associate = shm_security, | 679 | .associate = security_shm_associate, |
688 | .more_checks = shm_more_checks, | 680 | .more_checks = shm_more_checks, |
689 | }; | 681 | }; |
690 | struct ipc_params shm_params; | 682 | struct ipc_params shm_params; |