lkml.org 
[lkml]   [2019]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] network: wireless: p54u: Fix race between disconnect and firmware loading
Date
Alan Stern <stern@rowland.harvard.edu> writes:

> On Tue, 28 May 2019, Kalle Valo wrote:
>
>> The correct prefix is "p54:", but I can fix that during commit.
>
> Oh, okay, thanks.
>
>> > Index: usb-devel/drivers/net/wireless/intersil/p54/p54usb.c
>> > ===================================================================
>> > --- usb-devel.orig/drivers/net/wireless/intersil/p54/p54usb.c
>> > +++ usb-devel/drivers/net/wireless/intersil/p54/p54usb.c
>> > @@ -33,6 +33,8 @@ MODULE_ALIAS("prism54usb");
>> > MODULE_FIRMWARE("isl3886usb");
>> > MODULE_FIRMWARE("isl3887usb");
>> >
>> > +static struct usb_driver p54u_driver;
>>
>> How is it safe to use static variables from a wireless driver? For
>> example, what if there are two p54 usb devices on the host? How do we
>> avoid a race in that case?
>
> There is no race. This structure is not per-device; it refers only to
> the driver. In fact, the line above is only a forward declaration --
> the actual definition of p54u_driver was already in the source file.

Ah, I missed that. Thanks!

--
Kalle Valo

\
 
 \ /
  Last update: 2019-05-28 16:31    [W:0.122 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site