* [bigfix] x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers.
@ 2010-01-27 2:37 Russ Anderson
2010-01-27 8:18 ` [tip:x86/urgent] " tip-bot for Russ Anderson
0 siblings, 1 reply; 2+ messages in thread
From: Russ Anderson @ 2010-01-27 2:37 UTC (permalink / raw)
To: H. Peter Anvin, Ingo Molnar, tglx, linux-kernel
Cc: Dean Nelson, Russ Anderson
Pass the number of minors when unregistering MSR and CPUID drivers.
Reported-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Russ Anderson <rja@sgi.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@sgi.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:x86/urgent] x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers.
2010-01-27 2:37 [bigfix] x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers Russ Anderson
@ 2010-01-27 8:18 ` tip-bot for Russ Anderson
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Russ Anderson @ 2010-01-27 8:18 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, rja, hpa, mingo, dnelson, tglx
Commit-ID: da482474b8396e1a099c37ffc6541b78775aedb4
Gitweb: http://git.kernel.org/tip/da482474b8396e1a099c37ffc6541b78775aedb4
Author: Russ Anderson <rja@sgi.com>
AuthorDate: Tue, 26 Jan 2010 20:37:22 -0600
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Tue, 26 Jan 2010 23:52:38 -0800
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@redhat.com>
Signed-off-by: Dean Nelson <dnelson@redhat.com>
LKML-Reference: <20100127023722.GA22305@sgi.com>
Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
arch/x86/kernel/cpuid.c | 2 +-
arch/x86/kernel/msr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index cb27fd6..83e5e62 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -229,7 +229,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);
}
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 4bd93c9..206735a 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -285,7 +285,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);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-27 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-27 2:37 [bigfix] x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers Russ Anderson
2010-01-27 8:18 ` [tip:x86/urgent] " tip-bot for Russ Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox