From 92390644e30773fe98fc608cf4e0036272c19a97 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 12 Jun 2020 14:14:01 +0000 Subject: [PATCH] Fix config_intrhook leak on initial reset failure. MFC after: 1 week Sponsored by: iXsystems, Inc. --- sys/dev/nvme/nvme_ctrlr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index c98e9a80dfd0..2e9c274ee487 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1126,12 +1126,14 @@ nvme_ctrlr_start_config_hook(void *arg) status = nvme_ctrlr_hw_reset(ctrlr); if (status != 0) { nvme_ctrlr_fail(ctrlr); + config_intrhook_disestablish(&ctrlr->config_hook); return; } status = nvme_ctrlr_hw_reset(ctrlr); if (status != 0) { nvme_ctrlr_fail(ctrlr); + config_intrhook_disestablish(&ctrlr->config_hook); return; }