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]
Message-Id: <7f17f55a1d86fea9710c9f67a0008f1aada6b65d.1462876444.git.jthumshirn@suse.de>
Date:	Tue, 10 May 2016 12:39:44 +0200
From:	Johannes Thumshirn <jthumshirn@...e.de>
To:	Greg KH <gregkh@...uxfoundation.org>
Cc:	Andreas Werner <andreas.werner@....de>,
	Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
	Johannes Thumshirn <jthumshirn@...e.de>
Subject: [PATCH 1/2] 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@...e.de>
Reported-by: Andreas Werner <andreas.werner@....de>
Tested-by: Andreas Werner <andreas.werner@....de>
---
 drivers/mcb/mcb-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c
index b73c6e7..f5923c2 100644
--- a/drivers/mcb/mcb-core.c
+++ b/drivers/mcb/mcb-core.c
@@ -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);
 }
 
-- 
2.8.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ