+ if (host_priv->exc_actions[i].label == NULL) {
+ deferred_labels[i] = mac_exc_create_label();
+ } else {
+ deferred_labels[i] = NULL;
+ }
+ }
+#endif /* CONFIG_MACF */
+
+ host_lock(host_priv);
+
+ assert(EXC_TYPES_COUNT > FIRST_EXCEPTION);
+ for (count = 0, i = FIRST_EXCEPTION; i < EXC_TYPES_COUNT && count < *CountCnt; i++) {
+#if CONFIG_MACF
+ if (host_priv->exc_actions[i].label == NULL) {
+ // Lazy initialization (see ipc_port_init).
+ mac_exc_associate_action_label(&host_priv->exc_actions[i], deferred_labels[i]);
+ deferred_labels[i] = NULL; // Label is used, do not free.
+ }
+#endif
+
+ if ((exception_mask & (1 << i))
+#if CONFIG_MACF
+ && mac_exc_update_action_label(&host_priv->exc_actions[i], new_label) == 0
+#endif
+ ) {