On Tue, Apr 14, 2015 at 06:54:13PM +0300, Sagi Grimberg wrote: > This patch gives me a BUG_ON() when unloading the target stack > while having open sessions. Meh, looks like I messed up the strcmp return value once again: diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 5a35d3b66..ddaf76a 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -487,7 +487,7 @@ void target_unregister_template(const struct target_core_fabric_ops *fo) mutex_lock(&g_tf_lock); list_for_each_entry(t, &g_tf_list, tf_list) { - if (strcmp(t->tf_name, fo->name)) { + if (!strcmp(t->tf_name, fo->name)) { BUG_ON(atomic_read(&t->tf_access_cnt)); list_del(&t->tf_list); kfree(t); -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html