alloc_page() returns NULL, and removing the initialization
of rc outside of the loop.
v1 is reviewed by: Juergen Gross
Signed-off-by: Pan Bian
---
drivers/xen/gntalloc.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/xen/gntalloc.c b/drivers/xen/gntall
Variable err is initialized with 0. As a result, the return value may
be 0 even if get_zeroed_page() fails to allocate memory. This patch fixes
the bug, initializing err with "-ENOMEM".
v1 is reviewed by: Juergen Gross
Signed-off-by: Pan Bian
---
drivers/xen/xenbus/xenbus_probe.c
From: PanBian
On Mon, Dec 05, 2016 at 07:30:49AM +0100, Juergen Gross wrote:
> On 03/12/16 11:49, Pan Bian wrote:
> > In function xenstored_local_init(), the value of return variable err
> > should be negative on errors. But the value of err keeps 0 even if the
> > ca
From: Pan Bian
The return variable rc is initialized with "-ENOMEM" outside the loop.
However, it is reset in the loop, and its value is not negative during
the second or after repeat of the loop. If kzalloc() fails then, it will
return 0. This patch fixes the bug, assigning "
kernel.org/show_bug.cgi?id=188721
Signed-off-by: Pan Bian
---
drivers/xen/xenbus/xenbus_probe.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/xen/xenbus/xenbus_probe.c
b/drivers/xen/xenbus/xenbus_probe.c
index 33a31cf..f87d047 100644
--- a/drivers/xen/xenbus/xenbus_pro