diff options
Diffstat (limited to 'ipc/util.c')
-rw-r--r-- | ipc/util.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ipc/util.c b/ipc/util.c index 5a1808c774a2..579552abd50a 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -624,10 +624,9 @@ void ipc_rcu_putref(void *ptr) | |||
624 | int ipcperms (struct kern_ipc_perm *ipcp, short flag) | 624 | int ipcperms (struct kern_ipc_perm *ipcp, short flag) |
625 | { /* flag will most probably be 0 or S_...UGO from <linux/stat.h> */ | 625 | { /* flag will most probably be 0 or S_...UGO from <linux/stat.h> */ |
626 | uid_t euid = current_euid(); | 626 | uid_t euid = current_euid(); |
627 | int requested_mode, granted_mode, err; | 627 | int requested_mode, granted_mode; |
628 | 628 | ||
629 | if (unlikely((err = audit_ipc_obj(ipcp)))) | 629 | audit_ipc_obj(ipcp); |
630 | return err; | ||
631 | requested_mode = (flag >> 6) | (flag >> 3) | flag; | 630 | requested_mode = (flag >> 6) | (flag >> 3) | flag; |
632 | granted_mode = ipcp->mode; | 631 | granted_mode = ipcp->mode; |
633 | if (euid == ipcp->cuid || | 632 | if (euid == ipcp->cuid || |
@@ -803,9 +802,7 @@ struct kern_ipc_perm *ipcctl_pre_down(struct ipc_ids *ids, int id, int cmd, | |||
803 | goto out_up; | 802 | goto out_up; |
804 | } | 803 | } |
805 | 804 | ||
806 | err = audit_ipc_obj(ipcp); | 805 | audit_ipc_obj(ipcp); |
807 | if (err) | ||
808 | goto out_unlock; | ||
809 | 806 | ||
810 | if (cmd == IPC_SET) { | 807 | if (cmd == IPC_SET) { |
811 | err = audit_ipc_set_perm(extra_perm, perm->uid, | 808 | err = audit_ipc_set_perm(extra_perm, perm->uid, |