All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
@ 2016-07-07  8:04 Jan Beulich
       [not found] ` <577E291002000078000FBF18-rw/UEucdPrvD8XXLLHKrIiOjQekVJEpY@public.gmane.org>
  2016-07-07 10:35 ` Jarkko Sakkinen
  0 siblings, 2 replies; 10+ messages in thread
From: Jan Beulich @ 2016-07-07  8:04 UTC (permalink / raw)
  To: peterhuewe, jarkko.sakkinen, jgunthorpe, tpmdd
  Cc: Juergen Gross, xen-devel, boris.ostrovsky,
	tpmdd-devel@lists.sourceforge.net, david.vrabel

Only a positive return value indicates success.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 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@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
       [not found] ` <577E291002000078000FBF18-rw/UEucdPrvD8XXLLHKrIiOjQekVJEpY@public.gmane.org>
@ 2016-07-07 10:35   ` Jarkko Sakkinen
  2016-07-07 10:38     ` Jarkko Sakkinen
  2016-07-07 10:38     ` Jarkko Sakkinen
  0 siblings, 2 replies; 10+ messages in thread
From: Jarkko Sakkinen @ 2016-07-07 10:35 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Juergen Gross,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	david.vrabel-Sxgqhf6Nn4DQT0dZR+AlfA,
	xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b,
	boris.ostrovsky-QHcLZuEGTsvQT0dZR+AlfA

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-IBi9RG/b67k@public.gmane.org>

Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

/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,
> 
> 
> 

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
  2016-07-07  8:04 [PATCH] xen-tpmfront: correct return value check on xenbus_scanf() Jan Beulich
       [not found] ` <577E291002000078000FBF18-rw/UEucdPrvD8XXLLHKrIiOjQekVJEpY@public.gmane.org>
@ 2016-07-07 10:35 ` Jarkko Sakkinen
  1 sibling, 0 replies; 10+ messages in thread
From: Jarkko Sakkinen @ 2016-07-07 10:35 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Juergen Gross, tpmdd, jgunthorpe,
	tpmdd-devel@lists.sourceforge.net, david.vrabel, xen-devel,
	peterhuewe, boris.ostrovsky

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@suse.com>

Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

/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@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
  2016-07-07 10:35   ` Jarkko Sakkinen
@ 2016-07-07 10:38     ` Jarkko Sakkinen
  2016-07-07 12:00       ` Jan Beulich
       [not found]       ` <20160707103859.GA13815-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  2016-07-07 10:38     ` Jarkko Sakkinen
  1 sibling, 2 replies; 10+ messages in thread
From: Jarkko Sakkinen @ 2016-07-07 10:38 UTC (permalink / raw)
  To: Jan Beulich
  Cc: peterhuewe, jgunthorpe, tpmdd, david.vrabel,
	tpmdd-devel@lists.sourceforge.net, xen-devel, boris.ostrovsky,
	Juergen Gross, stable

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@suse.com>
> 
> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

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,
> > 
> > 
> > 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
  2016-07-07 10:35   ` Jarkko Sakkinen
  2016-07-07 10:38     ` Jarkko Sakkinen
@ 2016-07-07 10:38     ` Jarkko Sakkinen
  1 sibling, 0 replies; 10+ messages in thread
From: Jarkko Sakkinen @ 2016-07-07 10:38 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Juergen Gross, tpmdd, stable, jgunthorpe,
	tpmdd-devel@lists.sourceforge.net, david.vrabel, xen-devel,
	peterhuewe, boris.ostrovsky

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@suse.com>
> 
> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

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@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
  2016-07-07 10:38     ` Jarkko Sakkinen
@ 2016-07-07 12:00           ` Jan Beulich
       [not found]       ` <20160707103859.GA13815-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2016-07-07 12:00 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Juergen Gross, stable-u79uwXL29TY76Z2rM5mHXA,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	david.vrabel-Sxgqhf6Nn4DQT0dZR+AlfA,
	xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b,
	boris.ostrovsky-QHcLZuEGTsvQT0dZR+AlfA

>>> On 07.07.16 at 12:38, <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> wrote:
> 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-IBi9RG/b67k@public.gmane.org>
>> 
>> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> 
> Applied. Should this be CC'd to stable or not?

Actually the Xen code maintainers dislike this kind of change
(expressed in reply to a change elsewhere in the tree), so
maybe you want to sync with them whether to pull it back out.
In any event I don't think it needs Cc-ing to stable@.

Jan


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
@ 2016-07-07 12:00           ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2016-07-07 12:00 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: david.vrabel, peterhuewe, tpmdd-devel@lists.sourceforge.net,
	xen-devel, jgunthorpe, boris.ostrovsky, tpmdd, Juergen Gross,
	stable

>>> On 07.07.16 at 12:38, <jarkko.sakkinen@linux.intel.com> wrote:
> 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@suse.com>
>> 
>> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> 
> Applied. Should this be CC'd to stable or not?

Actually the Xen code maintainers dislike this kind of change
(expressed in reply to a change elsewhere in the tree), so
maybe you want to sync with them whether to pull it back out.
In any event I don't think it needs Cc-ing to stable@.

Jan


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
  2016-07-07 10:38     ` Jarkko Sakkinen
@ 2016-07-07 12:00       ` Jan Beulich
       [not found]       ` <20160707103859.GA13815-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2016-07-07 12:00 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Juergen Gross, tpmdd, stable, jgunthorpe,
	tpmdd-devel@lists.sourceforge.net, david.vrabel, xen-devel,
	peterhuewe, boris.ostrovsky

>>> On 07.07.16 at 12:38, <jarkko.sakkinen@linux.intel.com> wrote:
> 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@suse.com>
>> 
>> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> 
> Applied. Should this be CC'd to stable or not?

Actually the Xen code maintainers dislike this kind of change
(expressed in reply to a change elsewhere in the tree), so
maybe you want to sync with them whether to pull it back out.
In any event I don't think it needs Cc-ing to stable@.

Jan


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
  2016-07-07 12:00           ` Jan Beulich
  (?)
  (?)
@ 2016-07-07 12:21           ` Jarkko Sakkinen
  -1 siblings, 0 replies; 10+ messages in thread
From: Jarkko Sakkinen @ 2016-07-07 12:21 UTC (permalink / raw)
  To: Jan Beulich
  Cc: david.vrabel, peterhuewe, tpmdd-devel@lists.sourceforge.net,
	xen-devel, jgunthorpe, boris.ostrovsky, tpmdd, Juergen Gross,
	stable

On Thu, Jul 07, 2016 at 06:00:25AM -0600, Jan Beulich wrote:
> >>> On 07.07.16 at 12:38, <jarkko.sakkinen@linux.intel.com> wrote:
> > 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@suse.com>
> >> 
> >> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > 
> > Applied. Should this be CC'd to stable or not?
> 
> Actually the Xen code maintainers dislike this kind of change
> (expressed in reply to a change elsewhere in the tree), so
> maybe you want to sync with them whether to pull it back out.
> In any event I don't think it needs Cc-ing to stable@.

OK, it's in my master branch (bleeding edge) so no harm done yet.

> Jan

/Jarkko

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
  2016-07-07 12:00           ` Jan Beulich
  (?)
@ 2016-07-07 12:21           ` Jarkko Sakkinen
  -1 siblings, 0 replies; 10+ messages in thread
From: Jarkko Sakkinen @ 2016-07-07 12:21 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Juergen Gross, tpmdd, stable, jgunthorpe,
	tpmdd-devel@lists.sourceforge.net, david.vrabel, xen-devel,
	peterhuewe, boris.ostrovsky

On Thu, Jul 07, 2016 at 06:00:25AM -0600, Jan Beulich wrote:
> >>> On 07.07.16 at 12:38, <jarkko.sakkinen@linux.intel.com> wrote:
> > 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@suse.com>
> >> 
> >> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > 
> > Applied. Should this be CC'd to stable or not?
> 
> Actually the Xen code maintainers dislike this kind of change
> (expressed in reply to a change elsewhere in the tree), so
> maybe you want to sync with them whether to pull it back out.
> In any event I don't think it needs Cc-ing to stable@.

OK, it's in my master branch (bleeding edge) so no harm done yet.

> Jan

/Jarkko

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-07-07 12:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07  8:04 [PATCH] xen-tpmfront: correct return value check on xenbus_scanf() Jan Beulich
     [not found] ` <577E291002000078000FBF18-rw/UEucdPrvD8XXLLHKrIiOjQekVJEpY@public.gmane.org>
2016-07-07 10:35   ` Jarkko Sakkinen
2016-07-07 10:38     ` Jarkko Sakkinen
2016-07-07 12:00       ` Jan Beulich
     [not found]       ` <20160707103859.GA13815-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-07-07 12:00         ` Jan Beulich
2016-07-07 12:00           ` Jan Beulich
2016-07-07 12:21           ` Jarkko Sakkinen
2016-07-07 12:21           ` Jarkko Sakkinen
2016-07-07 10:38     ` Jarkko Sakkinen
2016-07-07 10:35 ` Jarkko Sakkinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.