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

Re: [Xen-devel] [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()



On Thu, Jul 07, 2016 at 01:35:54PM +0300, Jarkko Sakkinen wrote:
> On Thu, Jul 07, 2016 at 02:04:00AM -0600, Jan Beulich wrote:
> > Only a positive return value indicates success.
> > 
> > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>

Applied. Should this be CC'd to stable or not?

/Jarkko

> /Jarkko
> 
> > ---
> >  drivers/char/tpm/xen-tpmfront.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- 4.7-rc6-xenbus_scanf.orig/drivers/char/tpm/xen-tpmfront.c
> > +++ 4.7-rc6-xenbus_scanf/drivers/char/tpm/xen-tpmfront.c
> > @@ -344,7 +344,7 @@ static void backend_changed(struct xenbu
> >                     break;
> >  
> >             if (xenbus_scanf(XBT_NIL, dev->otherend,
> > -                           "feature-protocol-v2", "%d", &val) < 0)
> > +                           "feature-protocol-v2", "%d", &val) <= 0)
> >                     val = 0;
> >             if (!val) {
> >                     xenbus_dev_fatal(dev, -EINVAL,
> > 
> > 
> > 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.