提交 20831ad2 编写于 作者: M Ming Lei 提交者: Greg Kroah-Hartman

usb: otg: nop: fix oops triggered by otg_register_notifier

This patch adds BLOCKING_INIT_NOTIFIER_HEAD in nop_usb_xceiv_probe,
so that we can avoid oops caused by uninitialized
nop->otg.notifier.rwsem which will be touched in otg_register_notifier
path.
Reported-by: NGupta, Ajay Kumar <ajay.gupta@ti.com>
Tested-by: NGupta, Ajay Kumar <ajay.gupta@ti.com>
Cc: Balbi, Felipe <balbi@ti.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: NMing Lei <tom.leiming@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 0cdfb819
......@@ -132,6 +132,8 @@ static int __devinit nop_usb_xceiv_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, nop);
BLOCKING_INIT_NOTIFIER_HEAD(&nop->otg.notifier);
return 0;
exit:
kfree(nop);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册