lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACVXFVPEDs8ZMU9Fvkf6=R7dwpb+oKY-igYsCKm9JC+_5Nq9bA@mail.gmail.com>
Date:	Wed, 5 Sep 2012 08:30:52 +0800
From:	Ming Lei <ming.lei@...onical.com>
To:	Bjørn Mork <bjorn@...k.no>
Cc:	netdev@...r.kernel.org, linux-usb@...r.kernel.org,
	Oliver Neukum <oneukum@...e.de>
Subject: Re: [PATCH net] net: usbnet: fix softirq storm on suspend

On Tue, Sep 4, 2012 at 6:36 PM, Bjørn Mork <bjorn@...k.no> wrote:
>
> I believe any Ericsson or Gobi modem would do, and most likely other USB
> networking devices too.
>
> I haven't explored the gadget.  Doesn't it support remote wakeup?  Well,

No.

> it doesn't really have to just for testing this.  You just have to fake
> the remote wakeup support, either in the gadget or in the device
> driver.  It doesn't matter whether it works or not.  The point is making
> the driver suspend the USB device while the network device is running.

The attachment patch is what I have been using to make it support remote
wakeup, and looks it works wrt. runtime PM.


>
>
>
> So the code trigging this seems to be
>
>
> static enum skb_state defer_bh(struct usbnet *dev, struct sk_buff *skb,
>                 struct sk_buff_head *list, enum skb_state state)
> {
>         unsigned long           flags;
>         enum skb_state          old_state;
>         struct skb_data *entry = (struct skb_data *) skb->cb;
>
>         spin_lock_irqsave(&list->lock, flags);
>         old_state = entry->state;
>         entry->state = state;
>         __skb_unlink(skb, list);
>         spin_unlock(&list->lock);
>         spin_lock(&dev->done.lock);
>         __skb_queue_tail(&dev->done, skb);
>         if (dev->done.qlen == 1)
>                 tasklet_schedule(&dev->bh);
>         spin_unlock_irqrestore(&dev->done.lock, flags);
>         return old_state;
> }
>
>
> Hmm, I should probably dump stack here as well.. Anyway, it's a start.

Maybe a debug message in defer_bh is enough, :-)


Thanks,
--
Ming Lei

Download attachment "usb-gadget-remote-wakeup.patch" of type "application/octet-stream" (1087 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ