[lkml]   [2016]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] usb: f_mass_storage: test whether thread is running before starting another
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»

 \ /
  Last update: 2016-04-19 17:01    [W:0.057 / U:0.632 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site