Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5099424ybi; Tue, 28 May 2019 07:32:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKrUEs1uzjoDp1Zu1sj32K4xsOZl0YC1g5SDheAET8zd4LGjV3PqEQJtBvlxY9RVJtpORc X-Received: by 2002:a65:528a:: with SMTP id y10mr22716151pgp.287.1559053935864; Tue, 28 May 2019 07:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559053935; cv=none; d=google.com; s=arc-20160816; b=Bh/NvvFreQnUzN6p3yBYlXBAxq3b10o2dBCUXOW+fbmZmDL1I0BKSj/o7Rcq03YrxS aCmNLdKTOXuGOLKWM2rt5z87093XDhF7NaZZrz7hIx0zvyBCl9wUuRotp7VsMCM8WX0U 9GKNQ6ZNtLaDPVgUFm6seP8UxTuoOD5HJvgljQBnjlXDzQV1wnIHBDNMUSXX7L02Op7i BUMy6peMAFmVrKjO6ICR3yNRz8AiQJjMCgQneOllRRTYQxmjt5/R0yXWP/izw021zSSj E+PFcBALwMgTqOi//rP4k/+/HXl5GEaliUzKFMd4WcHfHj5bT/3iEtFQsfITwsfz9So6 1IKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature; bh=4BRFmxbB7+Wrr4nDqN0qMA8uhs6rMJ0AwMpZHPNC2Uo=; b=HPcNaPyxaKEQRTxpfwDv5yBWKg/Q1xpRywzwg4B9PHTYDuMhNLza5iI2jy0Gz8uPB4 vTalNtQojMtB1y6JD3Ew4aE2MrDjubkEE9XXnnzc561KIjhel5LFb8pizEf946TrNQT6 XsTraN6PxaUz5krtLxQsKZZKNa67sjINJnupBfvxru5m5KVjfZi9XmviCeUxRX05rr5z 6Ku1SwuZ/1LaJnaeSX9BB/qK10bdJXRxsJUoIrJNEKm41SzdhDjfYMo7O1xHu0nWBTeC G5dp03P8BB8JcnO9hQTlNLG0Cwv2U5qpb3+SrAAmMD8bAPyEV88CdNo2yUAVKW3uxyUJ /tkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZkwvxI+h; dkim=pass header.i=@codeaurora.org header.s=default header.b=DQP6RINU; 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 d75si24165193pfm.259.2019.05.28.07.32.00; Tue, 28 May 2019 07:32:15 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZkwvxI+h; dkim=pass header.i=@codeaurora.org header.s=default header.b=DQP6RINU; 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 S1727285AbfE1OaH (ORCPT + 99 others); Tue, 28 May 2019 10:30:07 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:48874 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726313AbfE1OaH (ORCPT ); Tue, 28 May 2019 10:30:07 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9B23760A4E; Tue, 28 May 2019 14:30:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559053806; bh=x73gs11UqeyquhhHifaz+Y5m6QpD+Y2yC03QFMfrKZI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ZkwvxI+hhmBeuzoh8EWA5ubIbQ2KPmdcR7iFPdi+DstAkeRPW8P7bXdAx11tqREMV FZlTAknEcwAOz8wYvh+LXGgv9ufBKwkbNSqN8mFhALUl2056CNhX4PeOxuzqsrJTFP 4fIkMJeaY/fbGzPmcwqWUHyu5xA8R6xCnqbMBwJ0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 723BE60769; Tue, 28 May 2019 14:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559053803; bh=x73gs11UqeyquhhHifaz+Y5m6QpD+Y2yC03QFMfrKZI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=DQP6RINU4XD0144grtyT/iVZOuRtbn5Oqo702k+QHJl6VtKdZjABNRmcw+ZnB/LFC w7r9NJPwi+CHZ1J6ZcEYk58YdoKYpfmGv5g0UYVX9mk7tzP7L9IkUpV7F2CZmXh4Zb +FJ8SnbljklUB0FbcXS3q8ZXDrKv99t21OgdkL9c= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 723BE60769 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Alan Stern Cc: Christian Lamparter , syzbot , , , , Kernel development list , USB list , , Subject: Re: [PATCH] network: wireless: p54u: Fix race between disconnect and firmware loading References: Date: Tue, 28 May 2019 17:29:59 +0300 In-Reply-To: (Alan Stern's message of "Tue, 28 May 2019 10:17:19 -0400 (EDT)") Message-ID: <875zpu4pp4.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Alan Stern 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