]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ipc/ipc_pset.c
xnu-7195.101.1.tar.gz
[apple/xnu.git] / osfmk / ipc / ipc_pset.c
index 7f247520f768f559507ee2086dd67d4c4d179eb6..3af85d1dfb9b5faf961af53713ecb2c3d790a73c 100644 (file)
@@ -176,13 +176,11 @@ ipc_pset_alloc_special(
        assert(space->is_table == IE_NULL);
        assert(!is_active(space));
 
-       pset = ips_object_to_pset(io_alloc(IOT_PORT_SET));
+       pset = ips_object_to_pset(io_alloc(IOT_PORT_SET, Z_WAITOK | Z_ZERO));
        if (pset == IPS_NULL) {
                return IPS_NULL;
        }
 
-       bzero((char *)pset, sizeof(*pset));
-
        io_lock_init(ips_to_object(pset));
        pset->ips_references = 1;
        pset->ips_object.io_bits = io_makebits(TRUE, IOT_PORT_SET, 0);
@@ -991,7 +989,7 @@ filt_machportevent(struct knote *kn, long hint __assert_only)
        int result = 0;
 
        /* mqueue locked by caller */
-       assert(imq_held(mqueue));
+       imq_held(mqueue);
        assert(hint != NOTE_REVOKE);
        if (imq_is_valid(mqueue)) {
                assert(!imq_is_set(mqueue));