Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5096878ybi; Tue, 28 May 2019 07:30:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyttN7ZFIDqbpcszEOi2zDvfS7qtBIGhYkEq7y0SU49kZketg9Q+3cMNdiD1phGAdWXBLO X-Received: by 2002:a17:902:e104:: with SMTP id cc4mr135288479plb.254.1559053804522; Tue, 28 May 2019 07:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559053804; cv=none; d=google.com; s=arc-20160816; b=Jz1km9BDvXWl8XYlsGC28uBpQvTCjeuJjERH+X5GxGA5C6Yfjz8C2BZAHXH3abAa84 sjykZKBA4KP6xt+pHGKdgw9YQqCg7CwQZ6Rm/p1f8KXfFvXN5GxIk3jZ9MQFON4Ydbrf 63NStfaXCf7ihuRzQjYnoOugB/nWTNmYudxlblpmP6OGVbWX7PmlGbQkR1t223H21drX HPfwvcNTVgnpvNksUJlnb1Zp7y57zqCV+reJycIC14d4z44RhGk9+YExACdlgSXr6T3t Ihrr0hBF4ddeftaBZdIH/cfCN9V75tRtAYYIelFCNIrb4+ZbCRkg3niUSUN+oqn1yi2S lOfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=vBHjhxbXqFr97yVE1Dg6znnEwBYOEJsHPMrbVB8SXjM=; b=mHni8mM9uRD2OJx95CEVYROEtUg/YPIJAhs4N5HouC6uytYkwhqzid1OFtfgQCe2Wv F8i/mlXMr9lIOOnY7ECQgBS6CV+y6LeUxuunYp0rfVsBRLR5n5uNP+11XqCKPGiN5qyY +Tk4S7q5MQ+DgRMXaetB88moe2BylXc2Ag+bBC8n5KPwozhNOYcE1ZJpMxhydNpAcR7j ZstqbrzJV1SBMd5eJvl9btzmJkZuBxgx9x6+WIkIbv1E1kVB/xkzVkdkEpvoXfYjGyM2 fXCRP/JKSfAjUWo3d63yCBmrRrOOKsSvY2TfwrvUjYycA3D3SqmSVHUlnHENTuwHLpnb m8ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si22946877plp.33.2019.05.28.07.29.35; Tue, 28 May 2019 07:30:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727561AbfE1ORV (ORCPT + 99 others); Tue, 28 May 2019 10:17:21 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:38290 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726609AbfE1ORV (ORCPT ); Tue, 28 May 2019 10:17:21 -0400 Received: (qmail 1747 invoked by uid 2102); 28 May 2019 10:17:19 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 28 May 2019 10:17:19 -0400 Date: Tue, 28 May 2019 10:17:19 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Kalle Valo cc: Christian Lamparter , syzbot , , , , Kernel development list , USB list , , Subject: Re: [PATCH] network: wireless: p54u: Fix race between disconnect and firmware loading In-Reply-To: <8736kyvkw9.fsf@purkki.adurom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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. Alan Stern