Re: [patch] KVM: always initialize *pdata in get_msr()

2015-01-24 Thread Dan Carpenter
On Fri, Jan 23, 2015 at 05:08:03PM +0100, Radim Krčmář wrote: This patch will prevent future detection of functional bugs :( Hm. You're right. Smatch should be able to follow the logic. The code to handle this is pretty new. I'll look into why it wasn't working. regards, dan carpenter --

Re: [patch] KVM: always initialize *pdata in get_msr()

2015-01-23 Thread Paolo Bonzini
On 23/01/2015 15:32, Dan Carpenter wrote: Smatch complains that there are some paths where we use uninitialized data in em_sysenter(). arch/x86/kvm/emulate.c:2410 em_sysenter() error: potentially using uninitialized 'msr_data'. The right thing to do is to ensure that the

[patch] KVM: always initialize *pdata in get_msr()

2015-01-23 Thread Dan Carpenter
Smatch complains that there are some paths where we use uninitialized data in em_sysenter(). arch/x86/kvm/emulate.c:2410 em_sysenter() error: potentially using uninitialized 'msr_data'. A couple examples of paths which don't set pdata are found in get_msr_hyperv() and

Re: [patch] KVM: always initialize *pdata in get_msr()

2015-01-23 Thread Radim Krčmář
2015-01-23 17:32+0300, Dan Carpenter: Smatch complains that there are some paths where we use uninitialized data in em_sysenter(). arch/x86/kvm/emulate.c:2410 em_sysenter() error: potentially using uninitialized 'msr_data'. I have two hypotheses why smatch thinks so 1)