Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14967090rwb; Mon, 28 Nov 2022 06:45:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf5FLSod0hKSgIHCBaYSWNEqxqiJAsC3MYbUKscwcq1y1L/ZBES9UhrVlM3m4mapnVVTPSXf X-Received: by 2002:a17:902:7e0e:b0:189:9284:2138 with SMTP id b14-20020a1709027e0e00b0018992842138mr2158466plm.90.1669646703589; Mon, 28 Nov 2022 06:45:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669646703; cv=none; d=google.com; s=arc-20160816; b=CjBnFug1+ZGNSsQp8h1IGHCb7vIP1PpSqPgpFFA1AKUzsd4Sa+dXe+IDr4fQ/QKRGA v+ab5YevvzHlUinThL3OClDtpBK2IsOKBBNRdkLNH1IxxhELD7MgCJXCsQMavP5yiwMl PQnmMrmpMla6ND/0nU1U/P5HHAzpnR00KtXNuuTmFSzIMOh9p11nhQVyYYc0a/3Hir0j 6wmPpK1gyLLraN0MUI8WiPNQhgcsh722W3vtL6N8R6GojEzE3N8frbMiwAcKoUw094MQ iDY6uRG0XYumrkWs1x/ZUIo/Y+1BzIWZ7WEGWil8LOPVxG3toz/bqKr5UttTIL+E22xq ccQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sMuw+r8XztM/y1RLcfVFDrwbd0bUxp2HwDoeUHaaJ4I=; b=Z/tPUcjxknGZU/hLRWsoqmEj+/gLx2c03atQTXAMuFCh82ylP0fODLtKeaIMZuVC3v snpTnM1Nlwj2z6qFCCEdM2wS2VjFfP1cveIz0gjzQSWCv9vfIlsnmvyTkJf+hZZQ0bjK id0/QHX7uNebhFzof4r1nZ+saz/deOUzq3ehAhOvoNLSdyu8njbc4IuJYJE/N3cEAUl0 UqhfmxYWtOw8RVnTMKuy7OKzXFBDce/4nSThj9PL7lX1YOfnotzSmbCcIhaPXF15kvtZ qAmfp9eGE4s3J6wF7CaRZZMKnGxpIdNQDsonfI9PDWc7WWGk7fNixlgcpq/7TPFSMJOE bpyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="lHZ+um/d"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t8-20020a056a0021c800b00574b46d3b26si10783488pfj.334.2022.11.28.06.44.51; Mon, 28 Nov 2022 06:45:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="lHZ+um/d"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232003AbiK1NnM (ORCPT + 84 others); Mon, 28 Nov 2022 08:43:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232013AbiK1Nm6 (ORCPT ); Mon, 28 Nov 2022 08:42:58 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B6B61131; Mon, 28 Nov 2022 05:42:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=sMuw+r8XztM/y1RLcfVFDrwbd0bUxp2HwDoeUHaaJ4I=; b=lHZ+um/dRDTPKX/QYmMSYhCILO +GZexIJXLRc2Pr3g4cE8ujWFp4NxKn/r9Y7SgCSO83epSVKZ+ZZWHROK+QcolC1ktkUAtH/d/oqOQ SUsNwiP3KhKEUd/4s0YH6i1eA3hYmXW3anOJ6anakRqdk6WhZuIymun513EEeBd30e6g=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ozeOw-003emo-2x; Mon, 28 Nov 2022 14:42:26 +0100 Date: Mon, 28 Nov 2022 14:42:26 +0100 From: Andrew Lunn To: Vincent MAILHOL Cc: Alan Stern , linux-can@vger.kernel.org, Marc Kleine-Budde , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , netdev@vger.kernel.org, linux-usb@vger.kernel.org, Saeed Mahameed , Jiri Pirko , Lukas Magel Subject: Re: [PATCH v4 2/6] can: etas_es58x: add devlink support Message-ID: References: <20221104073659.414147-1-mailhol.vincent@wanadoo.fr> <20221126162211.93322-1-mailhol.vincent@wanadoo.fr> <20221126162211.93322-3-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > But if a driver does make the call, it should be careful to ensure that > > the call happens _after_ the driver is finished using the interface-data > > pointer. For example, after all outstanding URBs have completed, if the > > completion handlers will need to call usb_get_intfdata(). > > ACK. I understand that it should be called *after* the completion of > any ongoing task. What sometimes gets people is /sys, /proc. etc. A process can have such a file open when the device is unplugged. If the read needs to make use of your private data structure, you need to guarantee it still exists. Ideally the core needs to wait and not call the disconnect until all such files are closed. Probably the USB core does, it is such an obvious issue, but i have no knowledge of USB. Andrew