* [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
@ 2016-07-07 8:04 Jan Beulich
2016-07-07 10:35 ` Jarkko Sakkinen
[not found] ` <20160707103554.GA13244@intel.com>
0 siblings, 2 replies; 5+ 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, 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] 5+ 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
@ 2016-07-07 10:35 ` Jarkko Sakkinen
[not found] ` <20160707103554.GA13244@intel.com>
1 sibling, 0 replies; 5+ messages in thread
From: Jarkko Sakkinen @ 2016-07-07 10:35 UTC (permalink / raw)
To: Jan Beulich
Cc: Juergen Gross, tpmdd, jgunthorpe, tpmdd-devel, 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] 5+ messages in thread
* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
[not found] ` <20160707103554.GA13244@intel.com>
@ 2016-07-07 10:38 ` Jarkko Sakkinen
[not found] ` <20160707103859.GA13815@intel.com>
1 sibling, 0 replies; 5+ 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,
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] 5+ messages in thread
* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
[not found] ` <20160707103859.GA13815@intel.com>
@ 2016-07-07 12:00 ` Jan Beulich
[not found] ` <577E607902000078000FC2FA@prv-mh.provo.novell.com>
1 sibling, 0 replies; 5+ 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,
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] 5+ messages in thread
* Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
[not found] ` <577E607902000078000FC2FA@prv-mh.provo.novell.com>
@ 2016-07-07 12:21 ` Jarkko Sakkinen
0 siblings, 0 replies; 5+ 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,
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] 5+ messages in thread
end of thread, other threads:[~2016-07-07 12:22 UTC | newest]
Thread overview: 5+ 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
2016-07-07 10:35 ` Jarkko Sakkinen
[not found] ` <20160707103554.GA13244@intel.com>
2016-07-07 10:38 ` Jarkko Sakkinen
[not found] ` <20160707103859.GA13815@intel.com>
2016-07-07 12:00 ` Jan Beulich
[not found] ` <577E607902000078000FC2FA@prv-mh.provo.novell.com>
2016-07-07 12:21 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).