* [PATCH 1/1] xen/unpopulated-alloc: fix error return code in fill_list()
@ 2021-05-08 2:19 Zhen Lei
2021-05-10 7:26 ` Juergen Gross
2021-05-10 9:26 ` Juergen Gross
0 siblings, 2 replies; 3+ messages in thread
From: Zhen Lei @ 2021-05-08 2:19 UTC (permalink / raw)
To: Boris Ostrovsky, Juergen Gross, Stefano Stabellini,
Andrew Morton, Dan Carpenter, Dan Williams, xen-devel,
linux-kernel
Cc: Zhen Lei
Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.
Fixes: a4574f63edc6 ("mm/memremap_pages: convert to 'struct range'")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
drivers/xen/unpopulated-alloc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/xen/unpopulated-alloc.c b/drivers/xen/unpopulated-alloc.c
index e64e6befc63b..87e6b7db892f 100644
--- a/drivers/xen/unpopulated-alloc.c
+++ b/drivers/xen/unpopulated-alloc.c
@@ -39,8 +39,10 @@ static int fill_list(unsigned int nr_pages)
}
pgmap = kzalloc(sizeof(*pgmap), GFP_KERNEL);
- if (!pgmap)
+ if (!pgmap) {
+ ret = -ENOMEM;
goto err_pgmap;
+ }
pgmap->type = MEMORY_DEVICE_GENERIC;
pgmap->range = (struct range) {
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] xen/unpopulated-alloc: fix error return code in fill_list()
2021-05-08 2:19 [PATCH 1/1] xen/unpopulated-alloc: fix error return code in fill_list() Zhen Lei
@ 2021-05-10 7:26 ` Juergen Gross
2021-05-10 9:26 ` Juergen Gross
1 sibling, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2021-05-10 7:26 UTC (permalink / raw)
To: Zhen Lei, Boris Ostrovsky, Stefano Stabellini, Andrew Morton,
Dan Carpenter, Dan Williams, xen-devel, linux-kernel
[-- Attachment #1.1.1: Type: text/plain, Size: 397 bytes --]
On 08.05.21 04:19, Zhen Lei wrote:
> Fix to return a negative error code from the error handling case instead
> of 0, as done elsewhere in this function.
>
> Fixes: a4574f63edc6 ("mm/memremap_pages: convert to 'struct range'")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] xen/unpopulated-alloc: fix error return code in fill_list()
2021-05-08 2:19 [PATCH 1/1] xen/unpopulated-alloc: fix error return code in fill_list() Zhen Lei
2021-05-10 7:26 ` Juergen Gross
@ 2021-05-10 9:26 ` Juergen Gross
1 sibling, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2021-05-10 9:26 UTC (permalink / raw)
To: Zhen Lei, Boris Ostrovsky, Stefano Stabellini, Andrew Morton,
Dan Carpenter, Dan Williams, xen-devel, linux-kernel
[-- Attachment #1.1.1: Type: text/plain, Size: 390 bytes --]
On 08.05.21 04:19, Zhen Lei wrote:
> Fix to return a negative error code from the error handling case instead
> of 0, as done elsewhere in this function.
>
> Fixes: a4574f63edc6 ("mm/memremap_pages: convert to 'struct range'")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Pushed to xen/tip.git for-linus-5.13b
Juergen
[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-10 9:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08 2:19 [PATCH 1/1] xen/unpopulated-alloc: fix error return code in fill_list() Zhen Lei
2021-05-10 7:26 ` Juergen Gross
2021-05-10 9:26 ` Juergen Gross
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).