Re: kvm: unable to handle kernel NULL pointer dereference

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Chris Wright
Date: Wednesday, June 4, 2008 - 9:25 pm

* Tobias Diedrich (ranma+kernel@tdiedrich.de) wrote:

Odd, svm_data is NULL, so svm_data->asid_generation is oopsing.

  static void pre_svm_run(struct vcpu_svm *svm)
  {
  	int cpu = raw_smp_processor_id();
  
  	struct svm_cpu_data *svm_data = per_cpu(svm_data, cpu);
  
  	svm->vmcb->control.tlb_ctl = TLB_CONTROL_DO_NOTHING;
  	if (svm->vcpu.cpu != cpu ||
  	    svm->asid_generation != svm_data->asid_generation) <--- here <---
  		new_asid(svm, svm_data);
  }

Doesn't really make any sense to find svm_data == NULL, since it's
allocated during module init (or boot in this case).  If that allocation
failed, you shouldn't ever get as far as vcpu_run.

I'm assuming that:
gdb -q vmlinux
(gdb) p/x 0xffffffff8021d456 + 0x6f9cba
is the same as
(gdb) p/x &per_cpu__svm_data

Otherwise, seems a bit like memory corruption (doesn't happen here w/
your .config).

thanks,
-chris
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
kvm: unable to handle kernel NULL pointer dereference, Tobias Diedrich, (Sun Jun 1, 1:48 am)
Re: kvm: unable to handle kernel NULL pointer dereference, Tobias Diedrich, (Wed Jun 4, 11:10 am)
Re: kvm: unable to handle kernel NULL pointer dereference, Chris Wright, (Wed Jun 4, 9:25 pm)
Re: kvm: unable to handle kernel NULL pointer dereference, Tobias Diedrich, (Wed Jun 4, 11:09 pm)
Re: kvm: unable to handle kernel NULL pointer dereference, Tobias Diedrich, (Thu Jun 5, 11:28 am)
Re: kvm: unable to handle kernel NULL pointer dereference, Tobias Diedrich, (Sun Jun 29, 11:02 am)