Re: [PATCH] target: simplify the target template registration API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2015-04-14 at 17:59 +0200, Christoph Hellwig wrote:
> 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);

Thanks, squashed into the original commit.

--nab

--
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




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux