Re: [Xen-devel] [PATCH] x86/sysctl: Fix NULL pointer dereference in error path

2017-01-12 Thread Andrew Cooper
On 12/01/17 10:13, Jan Beulich wrote: On 11.01.17 at 18:57, wrote: >> --- a/xen/arch/x86/sysctl.c >> +++ b/xen/arch/x86/sysctl.c >> @@ -229,7 +229,10 @@ long arch_do_sysctl( >> >> /* Bad featureset index? */ >> if ( !p ) >> +{ >> ret = -EINVAL; >> +

Re: [Xen-devel] [PATCH] x86/sysctl: Fix NULL pointer dereference in error path

2017-01-12 Thread Jan Beulich
>>> On 11.01.17 at 18:57, wrote: > --- a/xen/arch/x86/sysctl.c > +++ b/xen/arch/x86/sysctl.c > @@ -229,7 +229,10 @@ long arch_do_sysctl( > > /* Bad featureset index? */ > if ( !p ) > +{ > ret = -EINVAL; > +break; > +} > > cpui

[Xen-devel] [PATCH] x86/sysctl: Fix NULL pointer dereference in error path

2017-01-11 Thread Andrew Cooper
This was introduced by c/s c38869e711 "x86/cpuid: Drop the temporary linear feature bitmap from struct cpuid_policy", and caught by Coverity. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/sysctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/sysctl.c b