Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1434888imu; Wed, 9 Jan 2019 18:51:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN7wPIZ7LcuiUz6ULyabvKIqOAvMwc/CHRdzjT4gNxvAlc/Ot8ezmtozVVGSriji8pH/dqZp X-Received: by 2002:a17:902:5a4d:: with SMTP id f13mr8860700plm.49.1547088717071; Wed, 09 Jan 2019 18:51:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547088717; cv=none; d=google.com; s=arc-20160816; b=ltcJhL/uIjrgOmDNlzhQeJyaBxkdDpzemVRuScNQ3+Rdy3DDu7NOd78PaxRj+4eqmf 5bsTuajF2w6B5Kzmfye52TtU+Se7Omu6bnAH6CjQYAft8P933e2unPVTPeTLEl165hyD CHrum2oba8Mv/xjjqXLJyuQNGh8DQB4vr7h4/WTLaQR2xLlV93wQf3/QIlp21jSLA6qb bsNGeVCDfW/EyAf+P2bABqc15EXd037YP8FpOJPkv1/MYBAIDo0IYDjAPitRMlE1/7FK 6Gp+48925w5wUUEvnR7IM+95emOQZ8aqj11RT+UwLt4aDFn9lWJxPtLT+2lIqE7yQaY2 JN3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=p18eD1oWVtGu0SfiG4LV/LpESQd0jK9mMH1l8puA/3Q=; b=yxzgVk37Q+GuhDIl1OF6vVf4TBA2nKv2WhscBnDtbykpIh3rroIurtyp91IxAkaP3o oZuTpCl5yjylxpo8nH8ey6hSJDnUGZug+JG8olFfUBaDvRszoKbEQcMKC6dSUEirTWdn VoqJkQYcGyRD6BQTpu0cBwu/eJBA2gdoVYcnvhcP/F245nKx5GBQbdMyaR+x5Nzb45sJ WOZTyNSWShHW4GlM9k61x4/H/a8Esaov99iF9KK7yc3/Pf3uAaHhQYKlQItJs6gx57zo c9kIt+vazNMIlBCHI98VaQSf4/iQB5mXwUbStkluaP22FC4rvF2Pibvup9d252SURxYf Blrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="HYSxPg/N"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f61si15217196plb.51.2019.01.09.18.51.42; Wed, 09 Jan 2019 18:51:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@gmail.com header.s=20161025 header.b="HYSxPg/N"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726955AbfAJCji (ORCPT + 99 others); Wed, 9 Jan 2019 21:39:38 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:36900 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726425AbfAJCjh (ORCPT ); Wed, 9 Jan 2019 21:39:37 -0500 Received: by mail-it1-f196.google.com with SMTP id b5so14160999iti.2; Wed, 09 Jan 2019 18:39:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=p18eD1oWVtGu0SfiG4LV/LpESQd0jK9mMH1l8puA/3Q=; b=HYSxPg/N5DnbY3A7ogExH5KsS8AeeE9b7fvwSHXU9rVl4/EcblhkuFju80Z6AWhWYD mVTwrTbrrIgTw7E7RFSixvH+7sHk9lQQiJaNnVqt51LRl1l+TeoPFITrtCMRWq50+0oJ 82iC0PkQlerQg2Iny1Wi8JhLZGtFlu4D4h/7b/Wj7O1Ipc/CrUuifDK88y1kXWT9/dYH 2fHCZa9f3Izuu1sSHO3KQWH+gQkQWSibOb9zFg8QtUTJcKcr0gkkuPHPJVyapLA6Tk8O G9DPuM6VRk++f0y2IfjqFsV6he5DFLmVDvLWviLQUXvxB9pWtYL8CqrRtoi6K9Sy1NJg OvQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=p18eD1oWVtGu0SfiG4LV/LpESQd0jK9mMH1l8puA/3Q=; b=Zs7751P6d8wUxVzmw3iGj0sIk3WB4Pq859FQWVUETCptgeFKJrl+PM+SOEkiliifa+ IhFoBnNpl04cVdF8Lj8UIw819w1FbNBbMqFFE3j8VMjOrXVOMYU30N1p4/ayaXxg0Tcq NX9FyNMM/6rzGmOdH/+VYj/xh11jTi1xTnsAggUKjT060LduyZdXPKjdvD+KmZ8eaRj7 7tlwO1vlGwl7lsHH3WSTiTwLdkNrScva3LOvymS2DoYh92TqrdLK6DX/T4PZDB81q8WT RdRt/1eGA9yyYgVHtjzPKvChRD7GpbkulwzfbZewcDy3dKWWyyaqeiZdOFpFD6jkZwgx EVIQ== X-Gm-Message-State: AJcUukcT1cU0u4RgYvxJgwkI4yhm6g6Y740YTxuT/RVUcpN3u4uSTOU6 jbZyHUB2UVSHynkcEcdDu6q0n9g7cOEcgYizTaJ/mprY X-Received: by 2002:a02:bb9a:: with SMTP id g26mr5734146jan.44.1547087976737; Wed, 09 Jan 2019 18:39:36 -0800 (PST) MIME-Version: 1.0 References: <20190108130747.GA13437@Red> In-Reply-To: <20190108130747.GA13437@Red> From: Peter Chen Date: Thu, 10 Jan 2019 10:39:24 +0800 Message-ID: Subject: Re: [BUG] rmmod g_mass_storage result to segmentation fault To: Corentin Labbe Cc: balbi@kernel.org, Greg Kroah-Hartman , Thinh.Nguyen@synopsys.com, linux-usb@vger.kernel.org, lkml Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > When running an imx_defconfig on a imx6q-sabrelite, rmmod g_mass_storage = lead to the following crash: > [ 143.952834] Internal error: Oops: 817 [#1] SMP ARM > [ 143.957639] Modules linked in: dmatest psmouse serport da9063_wdt wl12= xx wl18xx wlcore wlcore_sdio brcmfmac brcmutil mwifiex_sdio mwifiex_pcie mw= ifiex rtl8150 pegasus cdc_eem i2c_algo_pca i2c_algo_pcf echainiv bnep crc_c= citt libcrc32c crc7 isofs nls_iso8859_15 udf crc_itu_t msdos binfmt_misc gs= pca_main uvcvideo adv7180 snd_usb_audio snd_hwdep snd_usbmidi_lib usb_f_uac= 2 usb_f_hid usb_f_uac1 u_audio usb_f_obex usb_f_eem usb_f_printer usb_f_uvc= usb_f_ecm usb_f_midi snd_rawmidi usb_f_ecm_subset usb_f_ss_lb usb_f_serial= usb_f_ncm g_ffs usb_f_fs g_zero g_audio g_mass_storage(-) usb_f_mass_stora= ge usb_f_rndis u_ether usb_f_acm u_serial libcomposite configfs usb_wwan us= bserial imx_vdoa videobuf2_vmalloc [last unloaded: g_ncm] > [ 144.021308] CPU: 3 PID: 9158 Comm: rmmod Not tainted 5.0.0-rc1-next-20= 190108 #1 > [ 144.028623] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) > [ 144.035170] PC is at usb_gadget_unregister_driver+0xac/0xd4 > [ 144.040748] LR is at 0x1242afc4 > [ 144.043895] pc : [] lr : [<1242afc4>] psr: 60000013 > [ 144.050166] sp : ed0e7f48 ip : a54b4ce2 fp : 00000000 > [ 144.055396] r10: 00000081 r9 : ed0e6000 r8 : c01011c4 > [ 144.060626] r7 : 00000081 r6 : bec49b98 r5 : bf12916c r4 : c129176c > [ 144.067159] r3 : 00000200 r2 : 00000100 r1 : 00000200 r0 : 00000100 > [ 144.073693] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segme= nt none > [ 144.080833] Control: 10c5387d Table: 3d33404a DAC: 00000051 > [ 144.086585] Process rmmod (pid: 9158, stack limit =3D 0x2ac398d3) > [ 144.092510] Stack: (0xed0e7f48 to 0xed0e8000) > [ 144.096877] 7f40: bf129200 c120c908 bec49b98 c01c965= c 616d5f67 735f7373 > [ 144.105063] 7f60: 61726f74 b6006567 00000017 c01175c8 b6f114c8 ed0e7fb= 0 bec49e14 000a1a98 > [ 144.113249] 7f80: bec49b7c c0117aec ffffffff c33d43a5 000278d4 c33d43a= 5 000278d4 616d5f67 > [ 144.121435] 7fa0: 735f7373 c0101000 000278d4 616d5f67 bec49b98 0000088= 0 00000000 bec49e18 > [ 144.129621] 7fc0: 000278d4 616d5f67 735f7373 00000081 00000000 0000000= 0 b6faf000 00000000 > [ 144.137807] 7fe0: bec49b90 bec49b80 000277b8 b6eb52f0 60000010 bec49b9= 8 00000000 00000000 > [ 144.146006] [] (usb_gadget_unregister_driver) from [] (sys_delete_module+0x130/0x1dc) > [ 144.155586] [] (sys_delete_module) from [] (ret_fa= st_syscall+0x0/0x28) > [ 144.163855] Exception stack(0xed0e7fa8 to 0xed0e7ff0) > [ 144.168914] 7fa0: 000278d4 616d5f67 bec49b98 0000088= 0 00000000 bec49e18 > [ 144.177100] 7fc0: 000278d4 616d5f67 735f7373 00000081 00000000 0000000= 0 b6faf000 00000000 > [ 144.185283] 7fe0: bec49b90 bec49b80 000277b8 b6eb52f0 > [ 144.190344] Code: e5953070 e595206c e3a00c01 e3a01c02 (e5823004) > [ 144.196538] ---[ end trace 86952e6cc74d8e8b ]--- > Segmentation fault Some questions: - Do you have issue for previous version,eg, v4.19 or v4.20? - Legacy gadget driver is not supported well now, do you have issues with configfs? - Any differences if the cable is connected or not? Peter