RE: [PATCH V5 2/8] x86/hyperv: Set Virtual Trust Level in VMBus init message

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

 



> From: Wei Liu <wei.liu@xxxxxxxxxx>
> Sent: Friday, August 11, 2023 2:15 PM
> To: Dexuan Cui <decui@xxxxxxxxxxxxx>
> > [...]
> > > +	local_irq_save(flags);
> > > +	input = *this_cpu_ptr(hyperv_pcpu_input_arg);
> > > +	output = (struct hv_get_vp_registers_output *)input;
> > > +	if (!input) {
> > > +		local_irq_restore(flags);
> > > +		goto done;
> >
> > Here the uninitialized 'ret' is returned.
> >
> > If we move the "done:" label one line earlier, we won't need the
> > the above " local_irq_restore(flags);"
> > Maybe we should add a WARN_ON_ONCE(1) before "goto done"?
> 
> Out of interest why will input be NULL here?
> 
> Thanks,
> Wei.

I don't think 'input' could be NULL here.
IMO we can use it without checking against NULL.




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux