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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Jan 2011 17:30:57 +0200
From:	Felipe Balbi <balbi@...com>
To:	Ming Lei <tom.leiming@...il.com>
Cc:	Yang Ruirui <ruirui.r.yang@...to.com>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Mian Yousaf Kaukab <mian.yousaf.kaukab@...ricsson.com>,
	Linus Walleij <linus.walleij@...ricsson.com>,
	Felipe Balbi <felipe.balbi@...ia.com>,
	Heikki Krogerus <ext-heikki.krogerus@...ia.com>,
	Tejun Heo <tj@...nel.org>,
	Samuel Ortiz <sameo@...ux.intel.com>, Hema HK <hemahk@...com>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb otg: use atomic notifier instead of blocking
 notifier

Hi,

On Wed, Jan 19, 2011 at 11:18:49PM +0800, Ming Lei wrote:
> 2011/1/19 Yang Ruirui <ruirui.r.yang@...to.com>:
> > [   28.990997] [<c00326a0>] (unwind_backtrace+0x0/0xec) from [<c007a39c>] (print_usage_bug+0x170/0x1b4)
> > [   29.007293] [<c007a39c>] (print_usage_bug+0x170/0x1b4) from [<c007a738>] (mark_lock+0x358/0x628)
> > [   29.019836] [<c007a738>] (mark_lock+0x358/0x628) from [<c007c118>] (__lock_acquire+0x554/0x1730)
> > [   29.032409] [<c007c118>] (__lock_acquire+0x554/0x1730) from [<c007d354>] (lock_acquire+0x60/0x74)
> > [   29.045166] [<c007d354>] (lock_acquire+0x60/0x74) from [<c037e6d8>] (down_read+0x48/0x5c)
> > [   29.057250] [<c037e6d8>] (down_read+0x48/0x5c) from [<c0070770>] (__blocking_notifier_call_chain+0x2c/0x5c)
> > [   29.074920] [<c0070770>] (__blocking_notifier_call_chain+0x2c/0x5c) from [<c00707b4>] (blocking_notifier_call_chain+0x14/0x18)
> > [   29.094573] [<c00707b4>] (blocking_notifier_call_chain+0x14/0x18) from [<c02784d8>] (musb_gadget_vbus_draw+0x38/0x60)
> 
> I am a little confused, why is blocking_notifier_call_chain called from
> musb_gadget_vbus_draw?  See source code of musb_gadget_vbus_draw:
> 
> 1587 static int musb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA)
> 1588 {
> 1589     struct musb *musb = gadget_to_musb(gadget);
> 1590
> 1591     if (!musb->xceiv->set_power)
> 1592         return -EOPNOTSUPP;
> 1593     return otg_set_power(musb->xceiv, mA);
> 1594 }

that's easy to guess since commit log says it's a problem on Meego
kernel.

> Are you sure the issue can be reproduced in 2.6.37 or -next tree?
> 
> In mainline code(2.6.37), blocking_notifier_call_chain is only called in
> threaded irq handler of otg driver wrt. musb driver, so seems enough.

true, but seems like Nokia is using to notify gadget states, which makes
a lot of sense when you start thinking about things such as battery
charging.

-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ