From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from devils.ext.ti.com ([198.47.26.153]:58662 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752024AbbKPQeW (ORCPT ); Mon, 16 Nov 2015 11:34:22 -0500 From: Felipe Balbi To: Peter Chen CC: , Peter Chen , Krzysztof Opasiak , Subject: Re: [PATCH 1/1] usb: gadget: f_loopback: fix the warning during the enumeration In-Reply-To: <1446537458-17982-1-git-send-email-peter.chen@freescale.com> References: <1446537458-17982-1-git-send-email-peter.chen@freescale.com> Date: Mon, 16 Nov 2015 10:34:13 -0600 Message-ID: <87twolnbsq.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, 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 lo= ckdep_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-00168-= gb730aaf #604 > [ 40.481496] Hardware name: Freescale i.MX6 SoloX (Device Tree) > [ 40.487345] Backtrace: > [ 40.489857] [<80014e94>] (dump_backtrace) from [<80015088>] (show_stac= k+0x18/0x1c) > [ 40.497445] r6:80b67a80 r5:00000000 r4:00000000 r3:00000000 > [ 40.503234] [<80015070>] (show_stack) from [<802e27b4>] (dump_stack+0x= 8c/0xa4) > [ 40.510503] [<802e2728>] (dump_stack) from [<8002cfe8>] (warn_slowpath= _common+0x80/0xbc) > [ 40.518612] r6:8007510c r5:00000009 r4:80b49c88 r3:00000001 > [ 40.524396] [<8002cf68>] (warn_slowpath_common) from [<8002d05c>] (war= n_slowpath_fmt+0x38/0x40) > [ 40.533109] r8:bcfdef80 r7:bdb705cc r6:000080d0 r5:be001e80 r4:809cc2= 78 > [ 40.539965] [<8002d028>] (warn_slowpath_fmt) from [<8007510c>] (lockde= p_trace_alloc+0x108/0x128) > [ 40.548766] r3:809d0128 r2:809cc278 > [ 40.552401] r4:600b0193 > [ 40.554990] [<80075004>] (lockdep_trace_alloc) from [<801093d4>] (kmem= _cache_alloc+0x28/0x15c) > [ 40.563618] r4:000080d0 r3:80b4aa8c > [ 40.567270] [<801093ac>] (kmem_cache_alloc) from [<804d95e4>] (ep_allo= c_request+0x58/0x68) > [ 40.575550] r10:7f01f104 r9:00000001 r8:bcfdef80 r7:bdb705cc r6:bc178= 700 r5:00000000 > [ 40.583512] r4:bcfdef80 r3:813c0a38 > [ 40.587183] [<804d958c>] (ep_alloc_request) from [<7f01f7ec>] (loopbac= k_set_alt+0x114/0x21c [usb_f_ss_lb]) > [ 40.596929] [<7f01f6d8>] (loopback_set_alt [usb_f_ss_lb]) from [<7f006= 910>] (composite_setup+0xbd0/0x17e8 [libcomposite]) > [ 40.607902] r10:bd3a2c0c r9:00000000 r8:bcfdef80 r7:bc178700 r6:bdb70= 2d0 r5:bcfdefdc > [ 40.615866] r4:7f0199b4 r3:00000002 > [ 40.619542] [<7f005d40>] (composite_setup [libcomposite]) from [<804da= e88>] (udc_irq+0x784/0xd1c) > [ 40.628431] r10:80bb5619 r9:c0876140 r8:00012001 r7:bdb71010 r6:bdb70= 568 r5:00010001 > [ 40.636392] r4:bdb70014 > [ 40.638985] [<804da704>] (udc_irq) from [<804d64f8>] (ci_irq+0x5c/0x11= 8) > [ 40.645702] r10:80bb5619 r9:be11e000 r8:00000117 r7:00000000 r6:bdb71= 010 r5:be11e060 > [ 40.653666] r4:bdb70010 > [ 40.656261] [<804d649c>] (ci_irq) from [<8007f638>] (handle_irq_event_= 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:bdb05= cc0 r5:be11e060 > [ 40.686998] r4:be11e000 > [ 40.689581] [<8007f6f8>] (handle_irq_event) from [<80082850>] (handle_= fasteoi_irq+0xd4/0x1b0) > [ 40.698120] r6:80b56a30 r5:be11e060 r4:be11e000 r3:00000000 > [ 40.703898] [<8008277c>] (handle_fasteoi_irq) from [<8007ec04>] (gener= ic_handle_irq+0x28/0x3c) > [ 40.712524] r7:00000000 r6:80b4aaf4 r5:00000117 r4:80b445fc > [ 40.718304] [<8007ebdc>] (generic_handle_irq) from [<8007ef20>] (__han= dle_domain_irq+0x6c/0xe8) > [ 40.727033] [<8007eeb4>] (__handle_domain_irq) from [<800095d4>] (gic_= handle_irq+0x48/0x94) > [ 40.735402] r9:c080f100 r8:80b4ac6c r7:c080e100 r6:80b67d40 r5:80b49f= 00 r4:c080e10c > [ 40.743290] [<8000958c>] (gic_handle_irq) from [<80015d38>] (__irq_svc= +0x58/0x78) > [ 40.750791] Exception stack(0x80b49f00 to 0x80b49f48) > [ 40.755873] 9f00: 00000001 00000001 00000000 80024320 80b48000 80b4a9d= 0 80b4a984 80b433e4 > [ 40.764078] 9f20: 00000001 807f4680 00000000 80b49f5c 80b49f20 80b49f5= 0 80071ca4 800113fc > [ 40.772272] 9f40: 200b0013 ffffffff > [ 40.775776] r9:807f4680 r8:00000001 r7:80b49f34 r6:ffffffff r5:200b00= 13 r4:800113fc > [ 40.783677] [<800113d4>] (arch_cpu_idle) from [<8006c5bc>] (default_id= le_call+0x28/0x38) > [ 40.791798] [<8006c594>] (default_idle_call) from [<8006c6dc>] (cpu_st= artup_entry+0x110/0x1b0) > [ 40.800445] [<8006c5cc>] (cpu_startup_entry) from [<807e95dc>] (rest_i= nit+0x12c/0x168) > [ 40.808376] r7:80b4a8c0 r3:807f4b7c > [ 40.812030] [<807e94b0>] (rest_init) from [<80ad7cc0>] (start_kernel+0= x360/0x3d4) > [ 40.819528] r5:80bcb000 r4:80bcb050 > [ 40.823171] [<80ad7960>] (start_kernel) from [<8000807c>] (0x8000807c) > > 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. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWSgWGAAoJEIaOsuA1yqREJcIP/3mMg95P83c1Qib9wZsxZ+3O BybqejcR6FokWV4/o7xA1BOJRO7ch/8QR3L1OCMogatntaAvRLKA6Qx+aGlJMXTZ vlSIMq3NWpxxfJp9WlkRJwcLQ7HHQdMKExXLDY7BXUjpaXjcZC7v03+c/91+GiMa GkgzhTEBjpyd3Umyx7qSOZDtPD52kIpXk26dITf0LrLsNn0u+JeBikffFoLjTgUC pUXTkfJxsw/GRaWmgabXFMDksjug7PsNuipEEyK8izhXElabbiOyxpOd5V6NTlyc mCVsAmoRBiHK1el+QWPPK9PCQ3uqsm0EDxt7BansVq/RZa+0SIrdwFvvyaeH/cZr EeyVGC3UHYlYizuX7+JSl0myptd1EP0fhSk7mANtkShVL4w3YkwgJz6G9HNM4sJT GD+oUL+QH/E9O5J+F9KF1KmtgAnElSg+xtRhPLskgm9TfuBhI+kVI6H9UWDT7WY/ MKqrQ4x35sgqUph2RbJ2SpkoSIzAM8o8C8hGVwvh/YDqCDgdhshlHUJVuHvq71E0 CjEGhfNeGzy+0EV1hlKjcERtbGZlY5gF0nHWmr/T4UsVfxbF81sknFsfmZUGt3uE +/K2bJEmtVuypweT0hW1pc5a683eHzPsIuMTrmvnR4qoOSlh41QVd3mg9vi48u/Z VyhgVq5S/ru1menjb2a2 =i13T -----END PGP SIGNATURE----- --=-=-=--