lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <539C49B3.7000606@windriver.com>
Date:	Sat, 14 Jun 2014 21:10:11 +0800
From:	"Yang,Wei" <Wei.Yang@...driver.com>
To:	Alan Stern <stern@...land.harvard.edu>
CC:	<balbi@...com>, <mina86@...a86.com>, <andrzej.p@...sung.com>,
	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] USB:gadget: Fix a warning while loading g_mass_storage

On 06/13/2014 09:39 PM, Alan Stern wrote:
> On Fri, 13 Jun 2014, Yang,Wei wrote:
>
>> On 06/09/2014 02:19 PM, Wei.Yang@...driver.com wrote:
>>> From: Yang Wei <Wei.Yang@...driver.com>
>>>
>>> While loading g_mass_storage module, the following warning
>>> is triggered.
>>>
>>> WARNING: at drivers/usb/gadget/composite.c:
>>> usb_composite_setup_continue: Unexpected call
>>> Modules linked in: fat vfat minix nls_cp437 nls_iso8859_1 g_mass_storage
>>> [<800179cc>] (unwind_backtrace+0x0/0x104) from [<80619608>] (dump_stack+0x20/0x24)
>>> [<80619608>] (dump_stack+0x20/0x24) from [<80025100>] (warn_slowpath_common+0x64/0x74)
>>> [<80025100>] (warn_slowpath_common+0x64/0x74) from [<800251cc>] (warn_slowpath_fmt+0x40/0x48)
>>> [<800251cc>] (warn_slowpath_fmt+0x40/0x48) from [<7f047774>] (usb_composite_setup_continue+0xb4/0xbc [g_mass_storage])
>>> [<7f047774>] (usb_composite_setup_continue+0xb4/0xbc [g_mass_storage]) from [<7f047ad4>] (handle_exception+0x358/0x3e4 [g_mass_storage])
>>> [<7f047ad4>] (handle_exception+0x358/0x3e4 [g_mass_storage]) from [<7f048080>] (fsg_main_thread+0x520/0x157c [g_mass_storage])
>>> [<7f048080>] (fsg_main_thread+0x520/0x157c [g_mass_storage]) from [<8004bc90>] (kthread+0x98/0x9c)
>>> [<8004bc90>] (kthread+0x98/0x9c) from [<8000faec>] (kernel_thread_exit+0x0/0x8)
>>>
>>> The root cause is that the existing code fails to take into
>>> account the possibility that common->new_fsg can change while
>>> do_set_interface() is running, because the spinlock isn't held
>>> at this point.
>>>
>>> Signed-off-by: Yang Wei <Wei.Yang@...driver.com>
>>> Signed-off-by: Alan Stern <stern@...land.harvard.edu>
>>> ---
>>>    drivers/usb/gadget/f_mass_storage.c |    6 ++++--
>>>    1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> Hi Alan,
>>>
>>> Thanks for your review, there are a few changes in v3:
>>>
>>> 1) Fix a coding style issue.
>>> 2) Refine the commit log
>>>
>>> Regards
>>> Wei
>> Ping, Alan, What do you think of it?
> You should not have added my "Signed-off-by:"; I did not give you
> permission to do that.

Sorry for it, I considered that you give me a few advice and hep me to 
refine the commit log,
so I added your signed off. Sorry again!

>
> Michal's comment about common->new_fsg not being protected by the lock
> is a good one.  It would be better for the patch description to say:
>
> 	The value of common->new_fsg that gets tested after
> 	do_set_interface() returns needs to be the same as the value
> 	used by do_set_interface().
>
> With that change, you may add
>
> Acked-by: Alan Stern <stern@...land.harvard.edu>

Okay, I would use the above description in v4.

Regards
Wei
>
> Alan Stern
>
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ