提交 7bc36409 编写于 作者: J Johannes Thumshirn 提交者: Greg Kroah-Hartman

mcb: Acquire reference to device in probe

mcb_probe() does not aqcuire a reference to the probed device but drops one
when removing the device. As it is actually using the device, it should grab
a reference via get_device().

This could lead to a panic found with a rmmod/modprobe stress test
Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de>
Reported-by: NAndreas Werner <andreas.werner@men.de>
Tested-by: NAndreas Werner <andreas.werner@men.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 69f1804a
......@@ -66,6 +66,7 @@ static int mcb_probe(struct device *dev)
if (!found_id)
return -ENODEV;
get_device(dev);
return mdrv->probe(mdev, found_id);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册