* mmdrop external module oops
@ 2008-02-20 10:27 Andrea Arcangeli
2008-02-20 14:10 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Andrea Arcangeli @ 2008-02-20 10:27 UTC (permalink / raw)
To: kvm-devel; +Cc: Avi Kivity
A 2.6.25-rc based kernel spawned an oops in mmdrop when kvm quit so
that reminded me of this:
Signed-off-by: Andrea Arcangeli <andrea@qumranet.com>
diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
index 20ef841..fd3cb1d 100644
--- a/kernel/external-module-compat.h
+++ b/kernel/external-module-compat.h
@@ -564,6 +564,11 @@ static inline void blahblah(void)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
#define mmdrop(x) do { (void)(x); } while (0)
+#define mmget(x) do { (void)(x); } while (0)
+
+#else
+
+#define mmget(x) do { atomic_inc(x); } while (0)
#endif
diff --git a/kernel/hack-module.awk b/kernel/hack-module.awk
index ad7a7c5..404944e 100644
--- a/kernel/hack-module.awk
+++ b/kernel/hack-module.awk
@@ -33,7 +33,7 @@
vmx_load_host_state = 0
}
-/atomic_inc\(&kvm->mm->mm_count\);/ { $0 = "//" $0 }
+/atomic_inc\(&kvm->mm->mm_count\);/ { $0 = "mmget(&kvm->mm->mm_count);" }
/^\t\.fault = / {
fcn = gensub(/,/, "", "g", $3)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: mmdrop external module oops
2008-02-20 10:27 mmdrop external module oops Andrea Arcangeli
@ 2008-02-20 14:10 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-02-20 14:10 UTC (permalink / raw)
To: Andrea Arcangeli; +Cc: kvm-devel
Andrea Arcangeli wrote:
> A 2.6.25-rc based kernel spawned an oops in mmdrop when kvm quit so
> that reminded me of this:
>
Applied, thanks.
--
Any sufficiently difficult bug is indistinguishable from a feature.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-20 14:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-20 10:27 mmdrop external module oops Andrea Arcangeli
2008-02-20 14:10 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox