Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E7AEC05027 for ; Thu, 2 Feb 2023 01:28:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231513AbjBBB2v (ORCPT ); Wed, 1 Feb 2023 20:28:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230417AbjBBB2s (ORCPT ); Wed, 1 Feb 2023 20:28:48 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id A6D586ACAF for ; Wed, 1 Feb 2023 17:28:47 -0800 (PST) Received: (qmail 510475 invoked by uid 1000); 1 Feb 2023 20:28:46 -0500 Date: Wed, 1 Feb 2023 20:28:46 -0500 From: Alan Stern To: Aaro Koskinen Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: gadget: udc: do not clear gadget driver.bus Message-ID: References: <20230201220125.GD2415@darkstar.musicnaut.iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230201220125.GD2415@darkstar.musicnaut.iki.fi> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 02, 2023 at 12:01:25AM +0200, Aaro Koskinen wrote: > Before the commit fc274c1e9973 ("USB: gadget: Add a new bus for gadgets") > gadget driver.bus was unused. For whatever reason, many UDC drivers set > this field explicitly to NULL in udc_start(). With the newly added gadget > bus, doing this will crash the driver during the attach. > > The problem was first reported, fixed and tested with OMAP UDC and g_ether. > Other drivers are changed based on code analysis only. > > Fixes: fc274c1e9973 ("USB: gadget: Add a new bus for gadgets") > Signed-off-by: Aaro Koskinen > --- Acked-by: Alan Stern