* [PATCH] xen/pvcalls: check for xenbus_read() errors
@ 2017-12-05 14:38 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2017-12-05 14:38 UTC (permalink / raw)
To: Boris Ostrovsky, Stefano Stabellini
Cc: Juergen Gross, xen-devel, kernel-janitors
Smatch complains that "len" is uninitialized if xenbus_read() fails so
let's add some error handling.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
index 40caa92bff33..afa3f1b5d807 100644
--- a/drivers/xen/pvcalls-front.c
+++ b/drivers/xen/pvcalls-front.c
@@ -1128,6 +1128,8 @@ static int pvcalls_front_probe(struct xenbus_device *dev,
}
versions = xenbus_read(XBT_NIL, dev->otherend, "versions", &len);
+ if (IS_ERR(versions))
+ return PTR_ERR(versions);
if (!len)
return -EINVAL;
if (strcmp(versions, "1")) {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] xen/pvcalls: check for xenbus_read() errors
@ 2017-12-05 14:38 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2017-12-05 14:38 UTC (permalink / raw)
To: Boris Ostrovsky, Stefano Stabellini
Cc: Juergen Gross, xen-devel, kernel-janitors
Smatch complains that "len" is uninitialized if xenbus_read() fails so
let's add some error handling.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
index 40caa92bff33..afa3f1b5d807 100644
--- a/drivers/xen/pvcalls-front.c
+++ b/drivers/xen/pvcalls-front.c
@@ -1128,6 +1128,8 @@ static int pvcalls_front_probe(struct xenbus_device *dev,
}
versions = xenbus_read(XBT_NIL, dev->otherend, "versions", &len);
+ if (IS_ERR(versions))
+ return PTR_ERR(versions);
if (!len)
return -EINVAL;
if (strcmp(versions, "1")) {
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: check for xenbus_read() errors
2017-12-05 14:38 ` Dan Carpenter
(?)
(?)
@ 2017-12-05 16:24 ` Juergen Gross
-1 siblings, 0 replies; 8+ messages in thread
From: Juergen Gross @ 2017-12-05 16:24 UTC (permalink / raw)
To: kernel-janitors
On 05/12/17 15:38, Dan Carpenter wrote:
> Smatch complains that "len" is uninitialized if xenbus_read() fails so
> let's add some error handling.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: check for xenbus_read() errors
2017-12-05 14:38 ` Dan Carpenter
(?)
@ 2017-12-05 16:24 ` Juergen Gross
-1 siblings, 0 replies; 8+ messages in thread
From: Juergen Gross @ 2017-12-05 16:24 UTC (permalink / raw)
To: Dan Carpenter, Boris Ostrovsky, Stefano Stabellini
Cc: xen-devel, kernel-janitors
On 05/12/17 15:38, Dan Carpenter wrote:
> Smatch complains that "len" is uninitialized if xenbus_read() fails so
> let's add some error handling.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: check for xenbus_read() errors
2017-12-05 14:38 ` Dan Carpenter
` (3 preceding siblings ...)
(?)
@ 2017-12-05 18:26 ` Stefano Stabellini
2017-12-06 16:39 ` Boris Ostrovsky
-1 siblings, 1 reply; 8+ messages in thread
From: Stefano Stabellini @ 2017-12-05 18:26 UTC (permalink / raw)
To: kernel-janitors
On Tue, 5 Dec 2017, Dan Carpenter wrote:
> Smatch complains that "len" is uninitialized if xenbus_read() fails so
> let's add some error handling.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
> index 40caa92bff33..afa3f1b5d807 100644
> --- a/drivers/xen/pvcalls-front.c
> +++ b/drivers/xen/pvcalls-front.c
> @@ -1128,6 +1128,8 @@ static int pvcalls_front_probe(struct xenbus_device *dev,
> }
>
> versions = xenbus_read(XBT_NIL, dev->otherend, "versions", &len);
> + if (IS_ERR(versions))
> + return PTR_ERR(versions);
> if (!len)
> return -EINVAL;
> if (strcmp(versions, "1")) {
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: check for xenbus_read() errors
2017-12-05 14:38 ` Dan Carpenter
` (2 preceding siblings ...)
(?)
@ 2017-12-05 18:26 ` Stefano Stabellini
-1 siblings, 0 replies; 8+ messages in thread
From: Stefano Stabellini @ 2017-12-05 18:26 UTC (permalink / raw)
To: Dan Carpenter
Cc: Juergen Gross, xen-devel, Boris Ostrovsky, Stefano Stabellini,
kernel-janitors
On Tue, 5 Dec 2017, Dan Carpenter wrote:
> Smatch complains that "len" is uninitialized if xenbus_read() fails so
> let's add some error handling.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
> index 40caa92bff33..afa3f1b5d807 100644
> --- a/drivers/xen/pvcalls-front.c
> +++ b/drivers/xen/pvcalls-front.c
> @@ -1128,6 +1128,8 @@ static int pvcalls_front_probe(struct xenbus_device *dev,
> }
>
> versions = xenbus_read(XBT_NIL, dev->otherend, "versions", &len);
> + if (IS_ERR(versions))
> + return PTR_ERR(versions);
> if (!len)
> return -EINVAL;
> if (strcmp(versions, "1")) {
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: check for xenbus_read() errors
2017-12-05 18:26 ` Stefano Stabellini
@ 2017-12-06 16:39 ` Boris Ostrovsky
0 siblings, 0 replies; 8+ messages in thread
From: Boris Ostrovsky @ 2017-12-06 16:39 UTC (permalink / raw)
To: Stefano Stabellini, Dan Carpenter
Cc: Juergen Gross, xen-devel, kernel-janitors
On 12/05/2017 01:26 PM, Stefano Stabellini wrote:
> On Tue, 5 Dec 2017, Dan Carpenter wrote:
>> Smatch complains that "len" is uninitialized if xenbus_read() fails so
>> let's add some error handling.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Applied to for-linus-4.15.
-boris
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: check for xenbus_read() errors
@ 2017-12-06 16:39 ` Boris Ostrovsky
0 siblings, 0 replies; 8+ messages in thread
From: Boris Ostrovsky @ 2017-12-06 16:39 UTC (permalink / raw)
To: Stefano Stabellini, Dan Carpenter
Cc: Juergen Gross, xen-devel, kernel-janitors
On 12/05/2017 01:26 PM, Stefano Stabellini wrote:
> On Tue, 5 Dec 2017, Dan Carpenter wrote:
>> Smatch complains that "len" is uninitialized if xenbus_read() fails so
>> let's add some error handling.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Applied to for-linus-4.15.
-boris
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-12-06 16:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-05 14:38 [PATCH] xen/pvcalls: check for xenbus_read() errors Dan Carpenter
2017-12-05 14:38 ` Dan Carpenter
2017-12-05 16:24 ` Juergen Gross
2017-12-05 16:24 ` Juergen Gross
2017-12-05 18:26 ` Stefano Stabellini
2017-12-05 18:26 ` Stefano Stabellini
2017-12-06 16:39 ` Boris Ostrovsky
2017-12-06 16:39 ` Boris Ostrovsky
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.