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

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

 



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,
> > 
> > 
> > 
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]