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-next>] [day] [month] [year] [list]
Message-ID: <20060720165911.42603374@gondolin.boeblingen.de.ibm.com>
Date:	Thu, 20 Jul 2006 16:59:11 +0200
From:	Cornelia Huck <cornelia.huck@...ibm.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	linux-kernel@...r.kernel.org
Subject: [Patch] [mm] Fix bus_rescan_devices() in -mm


With the __must_check changes in the driver core,
bus_rescan_devices_helper() now returns the return code of its call to
device_attach(). device_attach() will return < 0 on error, 0 on no
match and 1 on match. This means that bus_rescan_devices() will stop
after the first successful match for a device, which is probably not
what we want. Stopping on error makes sense, however.

Signed-off-by: Cornelia Huck <cornelia.huck@...ibm.com>

 bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -Naurp linux-2.6.18-rc1-mm2/drivers/base/bus.c linux-2.6.18-rc1-mm2+CH/drivers/base/bus.c
--- linux-2.6.18-rc1-mm2/drivers/base/bus.c	2006-07-17 18:15:37.000000000 +0200
+++ linux-2.6.18-rc1-mm2+CH/drivers/base/bus.c	2006-07-17 18:17:51.000000000 +0200
@@ -572,7 +572,7 @@ static int __must_check bus_rescan_devic
 		if (dev->parent)
 			up(&dev->parent->sem);
 	}
-	return ret;
+	return ret < 0 ? ret : 0;
 }
 
 /**
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ