From: Wu Fengguang Date: Mon, 23 Mar 2009 20:51:27 +0000 (-0300) Subject: KVM: Prevent trace call into unloaded module text X-Git-Tag: v2.6.28.10~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b3d3c98c95ea353d95299016973b99f569f6c64;p=thirdparty%2Fkernel%2Fstable.git KVM: Prevent trace call into unloaded module text (cherry picked from b82091824ee4970adf92d5cd6d57b12273171625) Add marker_synchronize_unregister() before module unloading. This prevents possible trace calls into unloaded module text. Signed-off-by: Wu Fengguang Signed-off-by: Avi Kivity Signed-off-by: Greg Kroah-Hartman --- diff --git a/virt/kvm/kvm_trace.c b/virt/kvm/kvm_trace.c index 41dcc845f78c3..f59874446440c 100644 --- a/virt/kvm/kvm_trace.c +++ b/virt/kvm/kvm_trace.c @@ -252,6 +252,7 @@ void kvm_trace_cleanup(void) struct kvm_trace_probe *p = &kvm_trace_probes[i]; marker_probe_unregister(p->name, p->probe_func, p); } + marker_synchronize_unregister(); relay_close(kt->rchan); debugfs_remove(kt->lost_file);