diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 5923675ff14453..f161e63fc123b1 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -3199,6 +3199,9 @@ vnet_pfsync_uninit(const void *unused __unused) ret = swi_remove(V_pfsync_swi_cookie); MPASS(ret == 0); ret = intr_event_destroy(V_pfsync_swi_ie); + if (ret != 0) + printf("ERROR: %s(): intr_event_destroy() ret = %d!\n", + __func__, ret); MPASS(ret == 0); } diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 0fdf41a9811f11..93160bfda50694 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -6743,6 +6743,9 @@ pf_unload_vnet(void) ret = swi_remove(V_pf_swi_cookie); MPASS(ret == 0); ret = intr_event_destroy(V_pf_swi_ie); + if (ret != 0) + printf("ERROR: %s(): intr_event_destroy() ret = %d!\n", + __func__, ret); MPASS(ret == 0); pf_unload_vnet_purge(); diff --git a/sys/netpfil/pf/pflow.c b/sys/netpfil/pf/pflow.c index 397d720215b212..82d2ccd213f3bf 100644 --- a/sys/netpfil/pf/pflow.c +++ b/sys/netpfil/pf/pflow.c @@ -466,6 +466,9 @@ pflow_destroy(int unit, bool drain) error = swi_remove(sc->sc_swi_cookie); MPASS(error == 0); error = intr_event_destroy(sc->sc_swi_ie); + if (error != 0) + printf("ERROR: %s(): intr_event_destroy() error = %d!\n", + __func__, error); MPASS(error == 0); callout_drain(&sc->sc_tmo); diff --git a/sys/sys/interrupt.h b/sys/sys/interrupt.h index 899d65e386e0ab..13e6bab8e8e330 100644 --- a/sys/sys/interrupt.h +++ b/sys/sys/interrupt.h @@ -181,7 +181,7 @@ int intr_event_create(struct intr_event **event, void *source, __printflike(9, 10); int intr_event_describe_handler(struct intr_event *ie, void *cookie, const char *descr); -int intr_event_destroy(struct intr_event *ie); +int __result_use_check intr_event_destroy(struct intr_event *ie); int intr_event_handle(struct intr_event *ie, struct trapframe *frame); int intr_event_remove_handler(void *cookie); int intr_event_suspend_handler(void *cookie); diff --git a/sys/x86/x86/intr_machdep.c b/sys/x86/x86/intr_machdep.c index 023c3df22580de..663692509de411 100644 --- a/sys/x86/x86/intr_machdep.c +++ b/sys/x86/x86/intr_machdep.c @@ -234,8 +234,11 @@ intr_register_source(struct intsrc *isrc) return (error); sx_xlock(&intrsrc_lock); if (interrupt_sources[vector] != NULL) { + int rc; sx_xunlock(&intrsrc_lock); - intr_event_destroy(isrc->is_event); + rc = intr_event_destroy(isrc->is_event); + printf("ERROR: %s(): intr_event_destroy() rc = %d!\n", + __func__, rc); return (EEXIST); } intrcnt_register(isrc);