Re: [PATCH] usb: f_mass_storage: test whether thread is running before starting another

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

 



On Mon, Apr 18 2016, Andrzej Pietrasiewicz wrote:
> The function responsible for verifying if a symlink can be made is in
> drivers/usb/gadget/configfs.c: config_usb_cfg_link()
>
> There is a comment from the author:
>
> 	 * Also a function instance can only be linked once.
>
> This is the code fragment of interest:
>
> 	list_for_each_entry(f, &cfg->func_list, list) {
> 		if (f->fi == fi) {
> 			ret = -EEXIST;
> 			goto out;
> 		}
> 	}

Thanks for checking.  This is exactly the kind of check I expected so
checking for thread not being run multiple times is enough when
configfs is in use.

Legacy gadgets may still construct crazy configurations but I’d call
that a bug in such legacy gadget.

-- 
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux