diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index e7993f67d..6414539cb 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -998,7 +998,9 @@ out: #ifndef CONFIG_SCST_PROC out_del_unlocked: + mutex_lock(&scst_mutex); list_del(&dev->dev_list_entry); + mutex_unlock(&scst_mutex); scst_free_device(dev); goto out; #else