projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ba5eeb
)
mm/madvise.c: fix return value of madvise_hwpoison()
author
Wanpeng Li
<
[email protected]
>
Wed, 11 Sep 2013 21:23:02 +0000
(14:23 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 11 Sep 2013 22:58:12 +0000
(15:58 -0700)
The return value outside for loop is always zero which means
madvise_hwpoison return success, however, this is not truth for
soft_offline_page w/ failure return value.
Signed-off-by: Wanpeng Li <
[email protected]
>
Reviewed-by: Naoya Horiguchi <
[email protected]
>
Cc: Andi Kleen <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/madvise.c
patch
|
blob
|
history
diff --git
a/mm/madvise.c
b/mm/madvise.c
index 30293ab95b065e45ce3e3dd7b7d906f0bcf299e5..51bffa4140277f8d0420a4aa3028a7afd4799baa 100644
(file)
--- a/
mm/madvise.c
+++ b/
mm/madvise.c
@@
-361,7
+361,7
@@
static int madvise_hwpoison(int bhv, unsigned long start, unsigned long end)
page_to_pfn(p), start);
ret = soft_offline_page(p, MF_COUNT_INCREASED);
if (ret)
-
break
;
+
return ret
;
continue;
}
pr_info("Injecting memory failure for page %#lx at %#lx\n",