mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
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: Johannes Thumshirn <[email protected]> Reported-by: Andreas Werner <[email protected]> Tested-by: Andreas Werner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
1 parent
69f1804a9a
commit
7bc364097a
1 file changed
+1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user