Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp209788pxa; Wed, 26 Aug 2020 08:34:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTFiAHXM1fQXmzH38JQSS32bgibw4St7CIDNlJK1RymxTS3YERU9CcbBmuS0RFPGiSAdkn X-Received: by 2002:a17:906:2313:: with SMTP id l19mr17105826eja.272.1598456074061; Wed, 26 Aug 2020 08:34:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598456074; cv=none; d=google.com; s=arc-20160816; b=bMTuwVUTHRsXkOWXPSF+iL/O/5dciYsl6IkxlNmvLYeGCOPqIKiwsu9J6S4t/HAc7R QCHH9LA1+MgMmWhKpABVe4UiZTUDmp6zbp7QjX+XaUD8H022x8hmI8f7Z7hoQg4MiX08 uK3kmaX8yO6q2B7CsbiObZHk2Ioyuou3gNfBuIhOZ2RFlMPP82stpFECCBo2h3LebPx6 wfFNtXvZ2wD7mnHm6ThV3pQ0vThvzVVa53yfJAwx64teEfp8E0ZK7JRCo2MU/O+ASpoS iHoUq+rX5zg4C6DkK6BdoK1Ne4uAZtPc9+zBfoVkfFm+7PsWUTvJ+UwLvKgIsTBzDuhs FAaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=R3FTLpvPcxMopnDzULcyRIqIyCxhLgwvfdbPxhkBvqw=; b=ztkvyjXOx7V35rvPTU/J+MwYy0lCTZa+mdPX0qorbnhUTMZ+a7tmuMAQ8dat8aZnSM SArMXJhJZOv/VFEKLaURhCDoEaUAvRDGwjyoawMg/tbMn8ULazWAkjEzkq4ICoXQK/6k S4uylWfa7CvpXD0EQVuWQSx0J0/qjaB5nz+zlzEvBqWQFC/9rf1mdt67SVS1HxkAHaaH tXD55OiiQfrm/5URIb+wAMrdU7OS+D0/pHMMlK91UmB6QTxoNFwRbfvvSHUlGfT2IuoI OxbNk1BIFdXDP5oKdyCdGEvTLjqfInc8AEnrAmYQ8+GAxT27mU/dbDBgxKqAbRe6QpFf 6KgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=u28JoRRl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p26si1553921edt.197.2020.08.26.08.34.11; Wed, 26 Aug 2020 08:34:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=u28JoRRl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728070AbgHZPdg (ORCPT + 99 others); Wed, 26 Aug 2020 11:33:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:50596 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727049AbgHZPdd (ORCPT ); Wed, 26 Aug 2020 11:33:33 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 51C9A2078D; Wed, 26 Aug 2020 15:33:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598456012; bh=2F0FlTbURVaj1x4DrL2qLIeLQqGNDXWILGGXNk69h3A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u28JoRRlaRp+ORrBZWuATbk3bssAY0RNJauoz7e/jSYK2dBkHdSvS+JdK8LU0d2mW O7JBScg+sp00QIkzgjNQesrxpVcVB0vuedg7WD/aqEBKIm8113RJ7j4MXrD44kWtcS 5jQCokq4yLUpjNL7xnC06THocySmnhcycqOavoBw= Date: Wed, 26 Aug 2020 17:33:47 +0200 From: Greg KH To: Marek Szyprowski , Brooke Basile Cc: Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Ilja Van Sprundel , Kees Cook , Felipe Balbi , Bartlomiej Zolnierkiewicz Subject: Re: [GIT PULL] USB fixes for 5.9-rc3 Message-ID: <20200826153347.GB4187816@kroah.com> References: <20200826134315.GA3882506@kroah.com> <1425ab4f-ef7e-97d9-238f-0328ab51eb35@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1425ab4f-ef7e-97d9-238f-0328ab51eb35@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 26, 2020 at 05:02:38PM +0200, Marek Szyprowski wrote: > Hi Greg, > > On 26.08.2020 15:43, Greg KH wrote: > > The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5: > > > > Linux 5.9-rc1 (2020-08-16 13:04:57 -0700) > > > > are available in the Git repository at: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git tags/usb-5.9-rc3 > > > > for you to fetch changes up to 23e26d0577535f5ffe4ff8ed6d06e009553c0bca: > > > > usb: typec: tcpm: Fix Fix source hard reset response for TDA 2.3.1.1 and TDA 2.3.1.2 failures (2020-08-25 16:02:35 +0200) > > > > ---------------------------------------------------------------- > > USB fixes for 5.9-rc3 > > > > Here are a small set of USB fixes for 5.9-rc3. > > > > Like most set of USB bugfixes, they include the usual: > > - usb gadget driver fixes > > - xhci driver fixes > > - typec fixes > > - new qurks and ids > > - fixes for USB patches merged in 5.9-rc1 > > > > Nothing huge, all of these have been in linux-next with no reported > > issues: > > > > Signed-off-by: Greg Kroah-Hartman > > > > ---------------------------------------------------------------- > > Alan Stern (1): > > USB: yurex: Fix bad gfp argument > > > > Andy Shevchenko (1): > > usb: hcd: Fix use after free in usb_hcd_pci_remove() > > > > Badhri Jagan Sridharan (1): > > usb: typec: tcpm: Fix Fix source hard reset response for TDA 2.3.1.1 and TDA 2.3.1.2 failures > > > > Bastien Nocera (2): > > USB: Also match device drivers using the ->match vfunc > > USB: Fix device driver race > > > > Brooke Basile (2): > > USB: gadget: u_f: add overflow checks to VLA macros > > Sorry, but the above patch breaks USB Ethernet Gadget operation. It also > didn't get the proper testing in linux-next (next-20200826 is the first > one with this patch). > > This is how it explodes on Samsung Exynos (ARM 32bit) based board with > g_ether module loaded: > > ------------[ cut here ]------------ > kernel BUG at mm/slub.c:4116! Why is slub.c erroring? How is this related to freeing memory? > Internal error: Oops - BUG: 0 [#1] SMP ARM > Modules linked in: usb_f_ecm g_ether(+) usb_f_rndis u_ether libcomposite > panel_samsung_s6e8aa0 s5p_csis s5p_fimc exynos4_is_common v4l2_fwnode > max8997_regulator rtc_max8997 leds_max8997 max8 > emless mms114 governor_simpleondemand s5p_mfc lima gpu_sched s5p_jpeg > v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 > videobuf2_common phy_exynos_usb2 exynosdrm analogix_dp > ?s3c2410_wdt > CPU: 0 PID: 616 Comm: modprobe Not tainted 5.9.0-rc1-00026-gb1cd1b65afba > #9023 > Hardware name: Samsung Exynos (Flattened Device Tree) > PC is at kfree+0x234/0x268 > LR is at config_item_set_name+0x60/0xb0 > ... > Process modprobe (pid: 616, stack limit = 0x(ptrval)) > ... > [] (kfree) from [] (config_item_set_name+0x60/0xb0) > [] (config_item_set_name) from [] > (config_group_init_type_name+0x1c/0x50) Odd, for a "normal" descriptor, the logic should have remained the same as without this patch. What does the descriptor definition of your device look like that it triggers this traceback? > [] (config_group_init_type_name) from [] > (usb_os_desc_prepare_interf_dir+0x54/0x124 [libcomposite]) > [] (usb_os_desc_prepare_interf_dir [libcomposite]) from > [] (rndis_alloc_inst+0x100/0x150 [usb_f_rndis]) > [] (rndis_alloc_inst [usb_f_rndis]) from [] > (try_get_usb_function_instance+0x88/0xa4 [libcomposite]) > [] (try_get_usb_function_instance [libcomposite]) from > [] (usb_get_function_instance+0xc/0x44 [libcomposite]) > [] (usb_get_function_instance [libcomposite]) from > [] (eth_bind+0xdc/0x34c [g_ether]) > [] (eth_bind [g_ether]) from [] > (composite_bind+0x78/0x1a8 [libcomposite]) > [] (composite_bind [libcomposite]) from [] > (udc_bind_to_driver+0x60/0x108) > [] (udc_bind_to_driver) from [] > (usb_gadget_probe_driver+0x100/0x158) > [] (usb_gadget_probe_driver) from [] > (do_one_initcall+0x54/0x220) > [] (do_one_initcall) from [] (do_init_module+0x60/0x210) > [] (do_init_module) from [] (load_module+0x2078/0x24c0) > [] (load_module) from [] (sys_finit_module+0xc8/0xd8) > [] (sys_finit_module) from [] > (ret_fast_syscall+0x0/0x54) > Exception stack(0xedd1dfa8 to 0xedd1dff0) > ... > ---[ end trace 0dc21d79c1880545 ]--- Brooke, any ideas? thanks, greg k-h