aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mcb
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2016-05-10 06:39:44 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-13 21:49:30 -0400
commit7bc364097a89a0a9a5e5e4989d6b3e6fb2027a9e (patch)
tree57316735809cb8b3b1991cfb60d09dc692225da3 /drivers/mcb
parent69f1804a9ab602701217a8c23d371f8f36f8b57a (diff)
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 <jthumshirn@suse.de> Reported-by: Andreas Werner <andreas.werner@men.de> Tested-by: Andreas Werner <andreas.werner@men.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mcb')
-rw-r--r--drivers/mcb/mcb-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c
index b73c6e7d28e4..f5923c253f7e 100644
--- a/drivers/mcb/mcb-core.c
+++ b/drivers/mcb/mcb-core.c
@@ -66,6 +66,7 @@ static int mcb_probe(struct device *dev)
66 if (!found_id) 66 if (!found_id)
67 return -ENODEV; 67 return -ENODEV;
68 68
69 get_device(dev);
69 return mdrv->probe(mdev, found_id); 70 return mdrv->probe(mdev, found_id);
70} 71}
71 72