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>] [day] [month] [year] [list]
Date:	Tue, 27 Jul 2010 10:07:57 -0400
From:	Matthew Garrett <mjg@...hat.com>
To:	linux-kernel@...r.kernel.org
Cc:	Matthew Garrett <mjg@...hat.com>,
	Corey Minyard <cminyard@...sta.com>
Subject: [PATCH] ipmi: Check the return status of open firmware device registration

If the registration of the Open Firmware IPMI device fails then we may
attempt to unregister a device that doesn't exist. Check the return code.

Signed-off-by: Matthew Garrett <mjg@...hat.com>
Cc: Corey Minyard <cminyard@...sta.com>
---
 drivers/char/ipmi/ipmi_si_intf.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 094bdc3..e39a744 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -3337,8 +3337,11 @@ static __devinit int init_ipmi_si(void)
 #endif
 
 #ifdef CONFIG_PPC_OF
-	of_register_platform_driver(&ipmi_of_platform_driver);
-	of_registered = 1;
+	rv = of_register_platform_driver(&ipmi_of_platform_driver);
+	if (rv)
+		printk(KERN_ERR PFX "Unable to register OF driver: %d\n", rv);
+	else
+		of_registered = 1;
 #endif
 
 	/* We prefer devices with interrupts, but in the case of a machine
-- 
1.7.1.1

--
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