* Gadget regression with u_ether in Linux next
@ 2016-09-16 22:03 Tony Lindgren
[not found] ` <20160916220355.w6whbd75eqegrz3q-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2016-09-16 22:03 UTC (permalink / raw)
To: Felipe Balbi, Harish Jenny K N
Cc: Jim Baxter, Greg Kroah-Hartman, linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
Hi,
Looks like commit c9ffc78745f8 ("usb: gadget: NCM: Protect dev->port_usb
using dev->lock") causes hangs for me with Linux next.
Reverting c9ffc78745f8 makes the issues go away, some more info below.
Regards,
Tony
8< --------------------
With gadgets configured and after connecting the cable:
configfs-gadget gadget: high-speed config #1: c
configfs-gadget gadget: init ecm
configfs-gadget gadget: notify connect false
configfs-gadget gadget: reset acm ttyGS0
configfs-gadget gadget: activate acm ttyGS0
gserial_connect: start ttyGS0
configfs-gadget gadget: acm ttyGS0 serial state 0003
configfs-gadget gadget: notify speed 425984000
configfs-gadget gadget: activate ecm
usb0: qlen 10
configfs-gadget gadget: ecm_open
usb0: eth_start
configfs-gadget gadget: packet filter 0c
configfs-gadget gadget: ecm req21.43 v000c i0000 l0
configfs-gadget gadget: acm ttyGS0 req21.20 v0000 i0002 l7
IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
configfs-gadget gadget: packet filter 0e
configfs-gadget gadget: ecm req21.43 v000e i0000 l0
configfs-gadget gadget: notify connect true
configfs-gadget gadget: notify speed 425984000
BUG: spinlock lockup suspected on CPU#0, swapper/0/0
lock: 0xdd4f7e00, .magic: dead4ead, .owner: <none>/-1, .owner_cpu: -1
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.0-rc6-next-20160915+ #608
Hardware name: Generic OMAP36xx (Flattened Device Tree)
[<c01102c0>] (unwind_backtrace) from [<c010c41c>] (show_stack+0x10/0x14)
[<c010c41c>] (show_stack) from [<c048d01c>] (dump_stack+0xb0/0xe4)
[<c048d01c>] (dump_stack) from [<c0196b4c>] (do_raw_spin_lock+0x114/0x1b8)
[<c0196b4c>] (do_raw_spin_lock) from [<c07cc650>] (_raw_spin_lock_irqsave+0x40/0x4c)
[<c07cc650>] (_raw_spin_lock_irqsave) from [<bf046ff0>] (rx_submit+0x14/0x1a0 [u_ether])
[<bf046ff0>] (rx_submit [u_ether]) from [<bf01325c>] (usb_gadget_giveback_request+0x64/0)
[<bf01325c>] (usb_gadget_giveback_request [udc_core]) from [<bf1b85b8>] (musb_g_giveback)
[<bf1b85b8>] (musb_g_giveback [musb_hdrc]) from [<bf1af160>] (musb_interrupt+0x174/0x30c)
[<bf1af160>] (musb_interrupt [musb_hdrc]) from [<bf1dc664>] (omap2430_musb_interrupt+0x8)
[<bf1dc664>] (omap2430_musb_interrupt [omap2430]) from [<c01a0950>] (__handle_irq_event_)
[<c01a0950>] (__handle_irq_event_percpu) from [<c01a0cf0>] (handle_irq_event_percpu+0x1c)
[<c01a0cf0>] (handle_irq_event_percpu) from [<c01a0d64>] (handle_irq_event+0x38/0x5c)
[<c01a0d64>] (handle_irq_event) from [<c01a405c>] (handle_level_irq+0xb8/0x144)
[<c01a405c>] (handle_level_irq) from [<c019fc84>] (generic_handle_irq+0x20/0x34)
[<c019fc84>] (generic_handle_irq) from [<c01a01c8>] (__handle_domain_irq+0x64/0xdc)
[<c01a01c8>] (__handle_domain_irq) from [<c07cce70>] (__irq_svc+0x70/0x98)
[<c07cce70>] (__irq_svc) from [<c0618150>] (cpuidle_enter_state+0xb8/0x3c4)
[<c0618150>] (cpuidle_enter_state) from [<c01869cc>] (cpu_startup_entry+0x130/0x220)
[<c01869cc>] (cpu_startup_entry) from [<c0b00c0c>] (start_kernel+0x354/0x3c8)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Gadget regression with u_ether in Linux next
[not found] ` <20160916220355.w6whbd75eqegrz3q-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
@ 2016-09-18 20:26 ` Harish Jenny K N
2016-09-19 8:19 ` Felipe Balbi
1 sibling, 0 replies; 4+ messages in thread
From: Harish Jenny K N @ 2016-09-18 20:26 UTC (permalink / raw)
To: Tony Lindgren, Felipe Balbi
Cc: Jim Baxter, Greg Kroah-Hartman, linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
>>>>> On Saturday 17 September 2016 12:03 AM, Tony Lindgren wrote:
> Hi,
>
> Looks like commit c9ffc78745f8 ("usb: gadget: NCM: Protect dev->port_usb
> using dev->lock") causes hangs for me with Linux next.
>
> Reverting c9ffc78745f8 makes the issues go away, some more info below.
>
> Regards,
>
> Tony
Sorry. There was a mistake with the commit. spinlock not acquired in if (dev->wrap) condition was also being tried to get unlocked.
Please revert/remove the commit.
Thanks,
Harish
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Gadget regression with u_ether in Linux next
[not found] ` <20160916220355.w6whbd75eqegrz3q-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-09-18 20:26 ` Harish Jenny K N
@ 2016-09-19 8:19 ` Felipe Balbi
[not found] ` <87h99c4804.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
1 sibling, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2016-09-19 8:19 UTC (permalink / raw)
To: Tony Lindgren, Harish Jenny K N
Cc: Jim Baxter, Greg Kroah-Hartman, linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 2327 bytes --]
Hi Greg,
Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> writes:
> Hi,
>
> Looks like commit c9ffc78745f8 ("usb: gadget: NCM: Protect dev->port_usb
> using dev->lock") causes hangs for me with Linux next.
>
> Reverting c9ffc78745f8 makes the issues go away, some more info below.
Can you revert this commit from your tree?
Here's the full commit for reference:
commit c9ffc78745f89e300fe704348dd8e6800acf4d18
Author: Harish Jenny K N <harish_kandiga-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
Date: Fri Sep 9 11:30:42 2016 +0200
usb: gadget: NCM: Protect dev->port_usb using dev->lock
This commit incorporates findings from
https://lkml.org/lkml/2016/4/25/594
The function has been modified to make sure we hold
the dev lock when accessing the net device pointer.
Acked-by: Jim Baxter <jim_baxter-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
Signed-off-by: Harish Jenny K N <harish_kandiga-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
Signed-off-by: Felipe Balbi <felipe.balbi-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c
index 9c8c9ed1dc9e..8cb08033b7c1 100644
--- a/drivers/usb/gadget/function/u_ether.c
+++ b/drivers/usb/gadget/function/u_ether.c
@@ -553,14 +553,16 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
spin_lock_irqsave(&dev->lock, flags);
if (dev->port_usb)
skb = dev->wrap(dev->port_usb, skb);
- spin_unlock_irqrestore(&dev->lock, flags);
if (!skb) {
/* Multi frame CDC protocols may store the frame for
* later which is not a dropped frame.
*/
if (dev->port_usb &&
- dev->port_usb->supports_multi_frame)
+ dev->port_usb->supports_multi_frame) {
+ spin_unlock_irqrestore(&dev->lock, flags);
goto multiframe;
+ }
+ spin_unlock_irqrestore(&dev->lock, flags);
goto drop;
}
}
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Gadget regression with u_ether in Linux next
[not found] ` <87h99c4804.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
@ 2016-09-19 9:07 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2016-09-19 9:07 UTC (permalink / raw)
To: Felipe Balbi
Cc: Tony Lindgren, Harish Jenny K N, Jim Baxter,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
On Mon, Sep 19, 2016 at 11:19:07AM +0300, Felipe Balbi wrote:
>
> Hi Greg,
>
> Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> writes:
> > Hi,
> >
> > Looks like commit c9ffc78745f8 ("usb: gadget: NCM: Protect dev->port_usb
> > using dev->lock") causes hangs for me with Linux next.
> >
> > Reverting c9ffc78745f8 makes the issues go away, some more info below.
>
> Can you revert this commit from your tree?
>
> Here's the full commit for reference:
>
> commit c9ffc78745f89e300fe704348dd8e6800acf4d18
> Author: Harish Jenny K N <harish_kandiga-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
> Date: Fri Sep 9 11:30:42 2016 +0200
>
> usb: gadget: NCM: Protect dev->port_usb using dev->lock
>
> This commit incorporates findings from
> https://lkml.org/lkml/2016/4/25/594
>
> The function has been modified to make sure we hold
> the dev lock when accessing the net device pointer.
>
> Acked-by: Jim Baxter <jim_baxter-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Harish Jenny K N <harish_kandiga-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Felipe Balbi <felipe.balbi-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Now reverted, thanks.
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-19 9:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16 22:03 Gadget regression with u_ether in Linux next Tony Lindgren
[not found] ` <20160916220355.w6whbd75eqegrz3q-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-09-18 20:26 ` Harish Jenny K N
2016-09-19 8:19 ` Felipe Balbi
[not found] ` <87h99c4804.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-09-19 9:07 ` Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.