From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from arroyo.ext.ti.com ([192.94.94.40]:58606 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752581AbbKPRNd (ORCPT ); Mon, 16 Nov 2015 12:13:33 -0500 From: Felipe Balbi To: Krzysztof Opasiak , Peter Chen CC: , Subject: Re: [PATCH 1/1] usb: gadget: f_loopback: fix the warning during the enumeration In-Reply-To: <564A0804.7040903@samsung.com> References: <1446537458-17982-1-git-send-email-peter.chen@freescale.com> <87twolnbsq.fsf@saruman.tx.rr.com> <564A0804.7040903@samsung.com> Date: Mon, 16 Nov 2015 11:13:23 -0600 Message-ID: <87io51n9zg.fsf@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: stable-owner@vger.kernel.org List-ID: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Krzysztof Opasiak writes: > On 11/16/2015 05:34 PM, Felipe Balbi wrote: >> >> Hi, >> >> Peter Chen writes: >>> The current code tries to allocate memory with GFP_KERNEL at >>> interrupt context, it would show below warning during the enumeration >>> when I test it with chipidea hardware, change GFP flag as GFP_ATOMIC >>> can fix this issue. >>> >>> [ 40.438237] zero gadget: high-speed config #2: loopback >>> [ 40.444924] ------------[ cut here ]------------ >>> [ 40.449609] WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:2755 = lockdep_trace_alloc+0x108/0x128() >>> [ 40.461715] DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) >>> [ 40.467130] Modules linked in: >>> [ 40.470216] usb_f_ss_lb g_zero libcomposite evbug >>> [ 40.473822] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.3.0-rc5-0016= 8-gb730aaf #604 >>> [ 40.481496] Hardware name: Freescale i.MX6 SoloX (Device Tree) >>> [ 40.487345] Backtrace: >>> [ 40.489857] [<80014e94>] (dump_backtrace) from [<80015088>] (show_st= ack+0x18/0x1c) >>> [ 40.497445] r6:80b67a80 r5:00000000 r4:00000000 r3:00000000 >>> [ 40.503234] [<80015070>] (show_stack) from [<802e27b4>] (dump_stack+= 0x8c/0xa4) >>> [ 40.510503] [<802e2728>] (dump_stack) from [<8002cfe8>] (warn_slowpa= th_common+0x80/0xbc) >>> [ 40.518612] r6:8007510c r5:00000009 r4:80b49c88 r3:00000001 >>> [ 40.524396] [<8002cf68>] (warn_slowpath_common) from [<8002d05c>] (w= arn_slowpath_fmt+0x38/0x40) >>> [ 40.533109] r8:bcfdef80 r7:bdb705cc r6:000080d0 r5:be001e80 r4:809c= c278 >>> [ 40.539965] [<8002d028>] (warn_slowpath_fmt) from [<8007510c>] (lock= dep_trace_alloc+0x108/0x128) >>> [ 40.548766] r3:809d0128 r2:809cc278 >>> [ 40.552401] r4:600b0193 >>> [ 40.554990] [<80075004>] (lockdep_trace_alloc) from [<801093d4>] (km= em_cache_alloc+0x28/0x15c) >>> [ 40.563618] r4:000080d0 r3:80b4aa8c >>> [ 40.567270] [<801093ac>] (kmem_cache_alloc) from [<804d95e4>] (ep_al= loc_request+0x58/0x68) >>> [ 40.575550] r10:7f01f104 r9:00000001 r8:bcfdef80 r7:bdb705cc r6:bc1= 78700 r5:00000000 >>> [ 40.583512] r4:bcfdef80 r3:813c0a38 >>> [ 40.587183] [<804d958c>] (ep_alloc_request) from [<7f01f7ec>] (loopb= ack_set_alt+0x114/0x21c [usb_f_ss_lb]) >>> [ 40.596929] [<7f01f6d8>] (loopback_set_alt [usb_f_ss_lb]) from [<7f0= 06910>] (composite_setup+0xbd0/0x17e8 [libcomposite]) >>> [ 40.607902] r10:bd3a2c0c r9:00000000 r8:bcfdef80 r7:bc178700 r6:bdb= 702d0 r5:bcfdefdc >>> [ 40.615866] r4:7f0199b4 r3:00000002 >>> [ 40.619542] [<7f005d40>] (composite_setup [libcomposite]) from [<804= dae88>] (udc_irq+0x784/0xd1c) >>> [ 40.628431] r10:80bb5619 r9:c0876140 r8:00012001 r7:bdb71010 r6:bdb= 70568 r5:00010001 >>> [ 40.636392] r4:bdb70014 >>> [ 40.638985] [<804da704>] (udc_irq) from [<804d64f8>] (ci_irq+0x5c/0x= 118) >>> [ 40.645702] r10:80bb5619 r9:be11e000 r8:00000117 r7:00000000 r6:bdb= 71010 r5:be11e060 >>> [ 40.653666] r4:bdb70010 >>> [ 40.656261] [<804d649c>] (ci_irq) from [<8007f638>] (handle_irq_even= t_percpu+0x7c/0x13c) >>> [ 40.664367] r6:00000000 r5:be11e060 r4:bdb05cc0 r3:804d649c >>> [ 40.670149] [<8007f5bc>] (handle_irq_event_percpu) from [<8007f740>]= (handle_irq_event+0x48/0x6c) >>> [ 40.679036] r10:00000000 r9:be008000 r8:00000001 r7:00000000 r6:bdb= 05cc0 r5:be11e060 >>> [ 40.686998] r4:be11e000 >>> [ 40.689581] [<8007f6f8>] (handle_irq_event) from [<80082850>] (handl= e_fasteoi_irq+0xd4/0x1b0) >>> [ 40.698120] r6:80b56a30 r5:be11e060 r4:be11e000 r3:00000000 >>> [ 40.703898] [<8008277c>] (handle_fasteoi_irq) from [<8007ec04>] (gen= eric_handle_irq+0x28/0x3c) >>> [ 40.712524] r7:00000000 r6:80b4aaf4 r5:00000117 r4:80b445fc >>> [ 40.718304] [<8007ebdc>] (generic_handle_irq) from [<8007ef20>] (__h= andle_domain_irq+0x6c/0xe8) >>> [ 40.727033] [<8007eeb4>] (__handle_domain_irq) from [<800095d4>] (gi= c_handle_irq+0x48/0x94) >>> [ 40.735402] r9:c080f100 r8:80b4ac6c r7:c080e100 r6:80b67d40 r5:80b4= 9f00 r4:c080e10c >>> [ 40.743290] [<8000958c>] (gic_handle_irq) from [<80015d38>] (__irq_s= vc+0x58/0x78) >>> [ 40.750791] Exception stack(0x80b49f00 to 0x80b49f48) >>> [ 40.755873] 9f00: 00000001 00000001 00000000 80024320 80b48000 80b4a= 9d0 80b4a984 80b433e4 >>> [ 40.764078] 9f20: 00000001 807f4680 00000000 80b49f5c 80b49f20 80b49= f50 80071ca4 800113fc >>> [ 40.772272] 9f40: 200b0013 ffffffff >>> [ 40.775776] r9:807f4680 r8:00000001 r7:80b49f34 r6:ffffffff r5:200b= 0013 r4:800113fc >>> [ 40.783677] [<800113d4>] (arch_cpu_idle) from [<8006c5bc>] (default_= idle_call+0x28/0x38) >>> [ 40.791798] [<8006c594>] (default_idle_call) from [<8006c6dc>] (cpu_= startup_entry+0x110/0x1b0) >>> [ 40.800445] [<8006c5cc>] (cpu_startup_entry) from [<807e95dc>] (rest= _init+0x12c/0x168) >>> [ 40.808376] r7:80b4a8c0 r3:807f4b7c >>> [ 40.812030] [<807e94b0>] (rest_init) from [<80ad7cc0>] (start_kernel= +0x360/0x3d4) >>> [ 40.819528] r5:80bcb000 r4:80bcb050 >>> [ 40.823171] [<80ad7960>] (start_kernel) from [<8000807c>] (0x8000807= c) >>> >>> It fixes commit 91c42b0da8e3 ("usb: gadget: loopback: Fix looping back >>> logic implementation"). >>> >>> Signed-off-by: Peter Chen >>> Cc: Krzysztof Opasiak >>> Cc: >> >> how is this stable material ? this commit was added to v4.4. merge >> window. Applying without stable tag. >> > > Peter added stable tag because my commit 91c42b0da8e3 ("usb: gadget:=20 > loopback: Fix looping back logic implementation") has been also send=20 > with stable tag and this is an important fix to that commit. you are correct, I looked at the commit but missed that. Sorry. I'll re-add the stable tag. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWSg60AAoJEIaOsuA1yqREisoP/1Yt8SYBhdI6bdZFBeEByfh9 sPwpGD8mqPxQXKVjqhR6TI+bz5d/LGU08Gj47wFyDc16Hjh1It+4VSxQtwxeA5tV t9duY6nRjhLynGKcnHrHce/ddpzWNs9PhSkfzCgxv1eBDeSqXfyXXU8/ijIRH0of 1S3/ceEsG2CfoqIBAePexSN2MZWtuiRr1gTj5vTJ3F/ocNoxnlpuLkviUDz8YR+o /TzlwsPdmLjbUQ1p8SD7P6MYJiMMJSnyrvj5KcyVVW2ctQKAjJT/SNsg5LcW6rDq ZlwAZOwBF9ySYmIHG1h626eRJnSIi18crO3982R0C7sOs3ZVJFaqMArRtp9xWGPC 8DuNh+4w0s3tZgif9VKj2Y8Au4aJnIiUnb4BcaYdUOrMhSJcr6bRI08ubopPiIu9 wwcsc1x8Ob/zlgVIiySd7/dUB/2w7EZEit5/F7ujqKF6DfMoo3Jvy5eUCzJ/Bci6 ohC29SDTnP+389PkSLBbprQq+76KQNQdjBRiy8oqrMnf+QXGO7NczF0BpesGN2GO qcyU2cTOdR5vDaMDof6GbJL6hp32jLJLBhw0nL0HLTsu/twD7/fbTpSk0GYzs+6D mvu9j/IEiflLZABadhxnV/ExJuJwjT8Qs97wSwtnIIMEhTj+NqHEDYwFIu2D21IU AhHzQWCIetdW4EgP6fJC =fVFU -----END PGP SIGNATURE----- --=-=-=--