[bug report] KVM: x86 emulator: consolidate segment accessors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Avi Kivity,

The patch 1aa366163b8b: "KVM: x86 emulator: consolidate segment
accessors" from Apr 27, 2011, leads to the following static checker
warning:

	arch/x86/kvm/emulate.c:649 set_segment_selector()
	error: uninitialized symbol 'base3'.

arch/x86/kvm/emulate.c
   641  static void set_segment_selector(struct x86_emulate_ctxt *ctxt, u16 selector,
   642                                   unsigned seg)
   643  {
   644          u16 dummy;
   645          u32 base3;
   646          struct desc_struct desc;
   647  
   648          ctxt->ops->get_segment(ctxt, &dummy, &desc, &base3, seg);
                                                             ^^^^^
It's complaining because we don't check if ->get_segment() returns
false.

   649          ctxt->ops->set_segment(ctxt, selector, &desc, base3, seg);
                                                              ^^^^^
   650  }

regards,
dan carpenter



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux