Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp254058rdd; Wed, 22 Nov 2023 15:14:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7Ew1K3W+oBQauKpV+cuYo71qzcPFBY43kBS+PPaqzm99gFXM2Q7K1cZGXXsoD66X6Zv2p X-Received: by 2002:a05:6a21:33a7:b0:18b:9053:d865 with SMTP id yy39-20020a056a2133a700b0018b9053d865mr370258pzb.42.1700694852771; Wed, 22 Nov 2023 15:14:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700694852; cv=none; d=google.com; s=arc-20160816; b=o3mMwI7KknOQ2X5chFRkPwuZJE3HEF3nGkdx4wFiNPPBR0hwBsAHKuOcSGU4lPfQhT 4C9uzxJYlHQRgpGILa9ZoujCKOpITTa8Z/U2mgmWu0wrXFHeELohPGJxj3JbaxeFlQOP zaizgu86eeJMHoetMbpAsuis/Ztn1QOu7GdD5CgSI18mcWjkS9mc0e0Lab7uy2Zg5PTJ LhFnlBhkhnN7zLNOyRWUF+DIDMJQwtDsQJeHG27bmhXRy59op7GvNG66dgWy6CPK9t1I BikuTmBEEo/ThDU/eOSKwDiFRJN4ziY1NlL1T96hvwvwDVIT9kPJUqUnARnf7QPbKCTP +yYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=wYxuH70oHfA52gNLRhhX4vP0LV6BSVurLPFK41qssdc=; fh=cqAMFEOehrIm2oKuoLAwvM8HKrvYZnL7DkYXKx1cyWk=; b=syYIO3cg04UY6dgNB2V63CRkXDm+FfRNkfpJPHtzegum8+iVVzzSwIbawKmRVkyZIG hhmkmvwVY0n2eJHGZtsQBo+XNyWz5x9qkGOKrGIyvFM0Ny4oLFllh0YQiGtOwEJl6wLg jm5rJM2Ll3RGzbMF58yXaVWynVlSS2qqKKgpVUOVtU/pU+r7WDszlTvHIakktr/JOQCh pf/yeiL5qIVy4wFDgqU8Rld8x02tOozDl55jIuLmnIPgd/UraEnklklt3mTms94kNytD CCWre0s3onYs8BYWlMa2mLG7nbYRmPUZ8GTCtMTqsLIn7Ao2Qs+LlA5L+wSVbqyXLFat kXmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=qXoDABKJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id f11-20020a056a00238b00b006cb8cbc9bb8si39033pfc.284.2023.11.22.15.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 15:14:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=qXoDABKJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 141188087B41; Wed, 22 Nov 2023 15:14:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234509AbjKVXOD (ORCPT + 99 others); Wed, 22 Nov 2023 18:14:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229879AbjKVXOC (ORCPT ); Wed, 22 Nov 2023 18:14:02 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 972A011F for ; Wed, 22 Nov 2023 15:13:58 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-332c7d4a6a7so164697f8f.2 for ; Wed, 22 Nov 2023 15:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700694837; x=1701299637; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wYxuH70oHfA52gNLRhhX4vP0LV6BSVurLPFK41qssdc=; b=qXoDABKJPDvyFk8Y5rtY0iwUYcq0FuBuk73Mze7YE0P9UawC8+xeXOmQ11mSDezZjB IYxHI/wR1I+lK9FlnJrE1PucqjwBMCbgonFJYibWciHI0rzTZuwEh9OF5jGY6qlAkI8e DtNnlRiD0+Bq+nW7sbr8Rs9ytxLfS19gKPWZDRCLfoPQqW9QVDNxALHcKySA87/FYZqE u1gGZxN4IEZ63m0SyYjX5IQuGH1cngwoq5oEgAjtEQyKMAjprDCGHRSvrX0kP7d8yti/ YtzWnBe3h/Qj1dDdc/v4nrdAa5NrCeRrFefBGOB03+UvtuodLi6eok1+w7nzgPCLaSKB dt+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700694837; x=1701299637; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wYxuH70oHfA52gNLRhhX4vP0LV6BSVurLPFK41qssdc=; b=NMxXy0871y4n4bGz1FHONYrT2VPZJXJc12hk1T3jEdeIlhOrvS9wBHeboV0QKgzOd5 urIwx0vjtFD1w9DDkdEFLRsXHiGgFn1FNIyoZB9aVDZGJzBfaIqAzCpK8HxpykAhwXZQ Yon5S1r4YEKvVI0rjnuSVLlbmVp6F6CjGukNl/H5K7SO+ZSjMSmHyafwuoWAz3LvZN2a bW5j8tnRQokRqKroC57cyNFCcEH3y0lqVeCMsJ81In55UDewlrpk92SnlP5t+yvqTEZY cqGhRJ3CjU0Os95VAR31oxSEMKsC2NR2tpQdPpjvb+5RvrowkB2ZRIifFgpw53mIQfgL 08vw== X-Gm-Message-State: AOJu0Yy3a7MBBCpyLEFw+rotycVHnBuqtEu9HdN42QZtjGRUDlRcqlEV ZNBQ4XagfUn6MUvXptz9/ZnfC+Tzu8jAz4ukB/48lw== X-Received: by 2002:a5d:6d0d:0:b0:332:c5ff:1ba5 with SMTP id e13-20020a5d6d0d000000b00332c5ff1ba5mr3509274wrq.13.1700694836803; Wed, 22 Nov 2023 15:13:56 -0800 (PST) MIME-Version: 1.0 References: <20231122220001.539770-1-royluo@google.com> <2023112253-fresh-blazing-baae@gregkh> In-Reply-To: <2023112253-fresh-blazing-baae@gregkh> From: Roy Luo Date: Wed, 22 Nov 2023 15:13:20 -0800 Message-ID: Subject: Re: [PATCH v1] USB: gadget: core: adjust uevent timing on gadget unbind To: Greg KH Cc: stern@rowland.harvard.edu, badhri@google.com, quic_kriskura@quicinc.com, francesco.dolcini@toradex.com, quic_eserrao@quicinc.com, ivan.orlov0322@gmail.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 22 Nov 2023 15:14:10 -0800 (PST) The logic is there since day 1 of udc in Commit 2ccea03a8f7ec93641791f2760d7cdc6cab6205f (usb: gadget: introduce UDC Class). Do you still want me to put on a fix tag? (Sorry for the spam, forgot to switch to plain text mode..) On Wed, Nov 22, 2023 at 2:07=E2=80=AFPM Greg KH wrote: > > On Wed, Nov 22, 2023 at 10:00:01PM +0000, Roy Luo wrote: > > The KOBJ_CHANGE uevent is sent before gadget unbind is actually > > executed, resulting in inaccurate uevent emitted at incorrect timing > > (the uevent would have USB_UDC_DRIVER variable set while it would > > soon be removed). > > Move the KOBJ_CHANGE uevent to the end of the unbind function so that > > uevent is sent only after the change has been made. > > > > Signed-off-by: Roy Luo > > --- > > drivers/usb/gadget/udc/core.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > What commit does this fix? > >