From cac97d38f58edb8865e65de20475ac4ea1169670 Mon Sep 17 00:00:00 2001 From: mlelstv Date: Sun, 5 Jun 2016 04:53:22 +0000 Subject: [PATCH] Tear down sysctls only after detaching children. This lets you enable debugging while detaching hangs. --- sys/dev/iscsi/iscsi_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/iscsi/iscsi_main.c b/sys/dev/iscsi/iscsi_main.c index b728dba5fa85..7535d0318716 100644 --- a/sys/dev/iscsi/iscsi_main.c +++ b/sys/dev/iscsi/iscsi_main.c @@ -663,12 +663,12 @@ iscsi_modcmd(modcmd_t cmd, void *arg) case MODULE_CMD_FINI: #ifdef _MODULE - sysctl_teardown(&clog); - error = config_cfdata_detach(iscsi_cfdata); if (error) return error; + sysctl_teardown(&clog); + config_cfattach_detach(iscsi_cd.cd_name, &iscsi_ca); config_cfdriver_detach(&iscsi_cd); devsw_detach(NULL, &iscsi_cdevsw);