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]
Date:	Tue, 26 Jan 2010 20:37:22 -0600
From:	Russ Anderson <rja@....com>
To:	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
	tglx@...utronix.de, linux-kernel@...r.kernel.org
Cc:	Dean Nelson <dnelson@...hat.com>, Russ Anderson <rja@....com>
Subject: [bigfix] x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers.

Pass the number of minors when unregistering MSR and CPUID drivers.

Reported-by: Dean Nelson <dnelson@...hat.com>
Signed-off-by: Dean Nelson <dnelson@...hat.com>
Signed-off-by: Russ Anderson <rja@....com>

---
While code reviewing the patch "x86, msr/cpuid: Register enough minors for
the MSR and CPUID drivers", Dean noticed the number of minors not being
passed when unregistering in the *_exit functions.

 arch/x86/kernel/cpuid.c |    2 +-
 arch/x86/kernel/msr.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux/arch/x86/kernel/cpuid.c
===================================================================
--- linux.orig/arch/x86/kernel/cpuid.c	2010-01-26 15:23:38.000000000 -0600
+++ linux/arch/x86/kernel/cpuid.c	2010-01-26 15:30:15.000000000 -0600
@@ -234,7 +234,7 @@ static void __exit cpuid_exit(void)
 	for_each_online_cpu(cpu)
 		cpuid_device_destroy(cpu);
 	class_destroy(cpuid_class);
-	unregister_chrdev(CPUID_MAJOR, "cpu/cpuid");
+	__unregister_chrdev(CPUID_MAJOR, 0, NR_CPUS, "cpu/cpuid");
 	unregister_hotcpu_notifier(&cpuid_class_cpu_notifier);
 }
 
Index: linux/arch/x86/kernel/msr.c
===================================================================
--- linux.orig/arch/x86/kernel/msr.c	2010-01-26 15:23:38.000000000 -0600
+++ linux/arch/x86/kernel/msr.c	2010-01-26 15:30:38.000000000 -0600
@@ -290,7 +290,7 @@ static void __exit msr_exit(void)
 	for_each_online_cpu(cpu)
 		msr_device_destroy(cpu);
 	class_destroy(msr_class);
-	unregister_chrdev(MSR_MAJOR, "cpu/msr");
+	__unregister_chrdev(MSR_MAJOR, 0, NR_CPUS, "cpu/msr");
 	unregister_hotcpu_notifier(&msr_class_cpu_notifier);
 }
 
-- 
Russ Anderson, OS RAS/Partitioning Project Lead  
SGI - Silicon Graphics Inc          rja@....com
--
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