All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/9pfs: initialize len to 0 to detect xenbus_read errors
@ 2017-04-13 17:57 Stefano Stabellini
  2017-04-18  8:09   ` Juergen Gross
  0 siblings, 1 reply; 4+ messages in thread
From: Stefano Stabellini @ 2017-04-13 17:57 UTC (permalink / raw)
  To: xen-devel
  Cc: linux-kernel, sstabellini, Stefano Stabellini, dan.carpenter,
	jgross, boris.ostrovsky, Eric Van Hensbergen, Ron Minnich,
	Latchesar Ionkov, v9fs-developer

In order to use "len" to check for xenbus_read errors properly, we need
to initialize len to 0 before passing it to xenbus_read.

Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
CC: dan.carpenter@oracle.com
CC: jgross@suse.com
CC: boris.ostrovsky@oracle.com
CC: Eric Van Hensbergen <ericvh@gmail.com>
CC: Ron Minnich <rminnich@sandia.gov>
CC: Latchesar Ionkov <lucho@ionkov.net>
CC: v9fs-developer@lists.sourceforge.net

---
Juergen, you could also merge this patch into commit
e9c53da56ff36458b1b8df95573f5dac80a1a956
---
---
 net/9p/trans_xen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
index 4786424..71e8564 100644
--- a/net/9p/trans_xen.c
+++ b/net/9p/trans_xen.c
@@ -386,7 +386,7 @@ static int xen_9pfs_front_probe(struct xenbus_device *dev,
 	struct xenbus_transaction xbt;
 	struct xen_9pfs_front_priv *priv = NULL;
 	char *versions;
-	unsigned int max_rings, max_ring_order, len;
+	unsigned int max_rings, max_ring_order, len = 0;
 
 	versions = xenbus_read(XBT_NIL, dev->otherend, "versions", &len);
 	if (!len)
-- 
1.9.1

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

* Re: [PATCH] xen/9pfs: initialize len to 0 to detect xenbus_read errors
  2017-04-13 17:57 [PATCH] xen/9pfs: initialize len to 0 to detect xenbus_read errors Stefano Stabellini
@ 2017-04-18  8:09   ` Juergen Gross
  0 siblings, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2017-04-18  8:09 UTC (permalink / raw)
  To: Stefano Stabellini, xen-devel
  Cc: linux-kernel, Stefano Stabellini, dan.carpenter, boris.ostrovsky,
	Eric Van Hensbergen, Ron Minnich, Latchesar Ionkov,
	v9fs-developer

On 13/04/17 19:57, Stefano Stabellini wrote:
> In order to use "len" to check for xenbus_read errors properly, we need
> to initialize len to 0 before passing it to xenbus_read.
> 
> Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
> CC: dan.carpenter@oracle.com
> CC: jgross@suse.com
> CC: boris.ostrovsky@oracle.com
> CC: Eric Van Hensbergen <ericvh@gmail.com>
> CC: Ron Minnich <rminnich@sandia.gov>
> CC: Latchesar Ionkov <lucho@ionkov.net>
> CC: v9fs-developer@lists.sourceforge.net

Committed to xen/tip for-linus-4.12


Thanks,

Juergen

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

* Re: [PATCH] xen/9pfs: initialize len to 0 to detect xenbus_read errors
@ 2017-04-18  8:09   ` Juergen Gross
  0 siblings, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2017-04-18  8:09 UTC (permalink / raw)
  To: Stefano Stabellini, xen-devel
  Cc: Latchesar Ionkov, Eric Van Hensbergen, linux-kernel,
	Stefano Stabellini, v9fs-developer, Ron Minnich, boris.ostrovsky,
	dan.carpenter

On 13/04/17 19:57, Stefano Stabellini wrote:
> In order to use "len" to check for xenbus_read errors properly, we need
> to initialize len to 0 before passing it to xenbus_read.
> 
> Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
> CC: dan.carpenter@oracle.com
> CC: jgross@suse.com
> CC: boris.ostrovsky@oracle.com
> CC: Eric Van Hensbergen <ericvh@gmail.com>
> CC: Ron Minnich <rminnich@sandia.gov>
> CC: Latchesar Ionkov <lucho@ionkov.net>
> CC: v9fs-developer@lists.sourceforge.net

Committed to xen/tip for-linus-4.12


Thanks,

Juergen


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

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

* [PATCH] xen/9pfs: initialize len to 0 to detect xenbus_read errors
@ 2017-04-13 17:57 Stefano Stabellini
  0 siblings, 0 replies; 4+ messages in thread
From: Stefano Stabellini @ 2017-04-13 17:57 UTC (permalink / raw)
  To: xen-devel
  Cc: jgross, Latchesar Ionkov, sstabellini, Eric Van Hensbergen,
	linux-kernel, Stefano Stabellini, v9fs-developer, Ron Minnich,
	boris.ostrovsky, dan.carpenter

In order to use "len" to check for xenbus_read errors properly, we need
to initialize len to 0 before passing it to xenbus_read.

Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
CC: dan.carpenter@oracle.com
CC: jgross@suse.com
CC: boris.ostrovsky@oracle.com
CC: Eric Van Hensbergen <ericvh@gmail.com>
CC: Ron Minnich <rminnich@sandia.gov>
CC: Latchesar Ionkov <lucho@ionkov.net>
CC: v9fs-developer@lists.sourceforge.net

---
Juergen, you could also merge this patch into commit
e9c53da56ff36458b1b8df95573f5dac80a1a956
---
---
 net/9p/trans_xen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
index 4786424..71e8564 100644
--- a/net/9p/trans_xen.c
+++ b/net/9p/trans_xen.c
@@ -386,7 +386,7 @@ static int xen_9pfs_front_probe(struct xenbus_device *dev,
 	struct xenbus_transaction xbt;
 	struct xen_9pfs_front_priv *priv = NULL;
 	char *versions;
-	unsigned int max_rings, max_ring_order, len;
+	unsigned int max_rings, max_ring_order, len = 0;
 
 	versions = xenbus_read(XBT_NIL, dev->otherend, "versions", &len);
 	if (!len)
-- 
1.9.1


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

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

end of thread, other threads:[~2017-04-18  8:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-13 17:57 [PATCH] xen/9pfs: initialize len to 0 to detect xenbus_read errors Stefano Stabellini
2017-04-18  8:09 ` Juergen Gross
2017-04-18  8:09   ` Juergen Gross
  -- strict thread matches above, loose matches on Subject: below --
2017-04-13 17:57 Stefano Stabellini

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.