X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/6d2010ae8f7a6078e10b361c6962983bab233e0f..3e170ce000f1506b7b5d2c5c7faec85ceabb573d:/osfmk/kern/audit_sessionport.c diff --git a/osfmk/kern/audit_sessionport.c b/osfmk/kern/audit_sessionport.c index 7e8ee9c30..9d3bd7ab9 100644 --- a/osfmk/kern/audit_sessionport.c +++ b/osfmk/kern/audit_sessionport.c @@ -86,11 +86,11 @@ audit_session_mksend(struct auditinfo_addr *aia_p, ipc_port_t *sessionport) audit_session_aiaref(aia_p); - /* Need a send-once right for the target of the notification */ - notifyport = ipc_port_make_sonce(port); - /* Request a no-senders notification (at the new make-send threshold) */ ip_lock(port); + /* Need a send-once right for the target of the notification */ + notifyport = ipc_port_make_sonce_locked(port); + /* Request a no-senders notification (at the new make-send threshold) */ ipc_port_nsrequest(port, port->ip_mscount, notifyport, ¬ifyport); /* port unlocked */ @@ -175,9 +175,7 @@ audit_session_nosenders(mach_msg_header_t *msg) * request, re-arm the notification with the new threshold. */ if (port->ip_mscount > notification->not_count) { - ip_unlock(port); - notifyport = ipc_port_make_sonce(port); - ip_lock(port); + notifyport = ipc_port_make_sonce_locked(port); ipc_port_nsrequest(port, port->ip_mscount, notifyport, ¬ifyport); /* port unlocked */