* [PATCH] mm: fix is_pinnable_page return value
@ 2022-06-11 13:34 Zhangfei Gao
2022-06-11 14:56 ` Matthew Wilcox
0 siblings, 1 reply; 3+ messages in thread
From: Zhangfei Gao @ 2022-06-11 13:34 UTC (permalink / raw
To: Minchan Kim, John Hubbard, Paul E . McKenney, Andrew Morton,
shameerali.kolothum.thodi
Cc: linux-mm, linux-kernel, Zhangfei Gao
Commit 1c563432588d ("mm: fix is_pinnable_page against a cma page")
Changes from
return !(is_zone_movable_page(page) || is_migrate_cma_page(page)) ||
is_zero_pfn(page_to_pfn(page));
to
return !(is_zone_movable_page(page) || is_zero_pfn(page_to_pfn(page)));
Unfortunately, this changes the return value since the ! area is error.
It should be:
return !(is_zone_movable_page(page)) || is_zero_pfn(page_to_pfn(page));
This causes qemu to be hung with a passthrough device.
Fixes: 1c563432588d ("mm: fix is_pinnable_page against a cma page")
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
---
include/linux/mm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index bc8f326be0ce..bbbcdde6c4dc 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1600,7 +1600,7 @@ static inline bool is_pinnable_page(struct page *page)
if (mt == MIGRATE_CMA || mt == MIGRATE_ISOLATE)
return false;
#endif
- return !(is_zone_movable_page(page) || is_zero_pfn(page_to_pfn(page)));
+ return !(is_zone_movable_page(page)) || is_zero_pfn(page_to_pfn(page));
}
#else
static inline bool is_pinnable_page(struct page *page)
--
2.36.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: fix is_pinnable_page return value
2022-06-11 13:34 [PATCH] mm: fix is_pinnable_page return value Zhangfei Gao
@ 2022-06-11 14:56 ` Matthew Wilcox
2022-06-11 15:49 ` Zhangfei Gao
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2022-06-11 14:56 UTC (permalink / raw
To: Zhangfei Gao
Cc: Minchan Kim, John Hubbard, Paul E . McKenney, Andrew Morton,
shameerali.kolothum.thodi, linux-mm, linux-kernel
On Sat, Jun 11, 2022 at 09:34:42PM +0800, Zhangfei Gao wrote:
> Commit 1c563432588d ("mm: fix is_pinnable_page against a cma page")
> Changes from
> return !(is_zone_movable_page(page) || is_migrate_cma_page(page)) ||
> is_zero_pfn(page_to_pfn(page));
> to
> return !(is_zone_movable_page(page) || is_zero_pfn(page_to_pfn(page)));
Mailing lists can be read as well as written.
https://lore.kernel.org/linux-mm/165490039431.944052.12458624139225785964.stgit@omen/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: fix is_pinnable_page return value
2022-06-11 14:56 ` Matthew Wilcox
@ 2022-06-11 15:49 ` Zhangfei Gao
0 siblings, 0 replies; 3+ messages in thread
From: Zhangfei Gao @ 2022-06-11 15:49 UTC (permalink / raw
To: Matthew Wilcox
Cc: Minchan Kim, John Hubbard, Paul E . McKenney, Andrew Morton,
shameerali.kolothum.thodi, linux-mm, linux-kernel
On 2022/6/11 下午10:56, Matthew Wilcox wrote:
> On Sat, Jun 11, 2022 at 09:34:42PM +0800, Zhangfei Gao wrote:
>> Commit 1c563432588d ("mm: fix is_pinnable_page against a cma page")
>> Changes from
>> return !(is_zone_movable_page(page) || is_migrate_cma_page(page)) ||
>> is_zero_pfn(page_to_pfn(page));
>> to
>> return !(is_zone_movable_page(page) || is_zero_pfn(page_to_pfn(page)));
> Mailing lists can be read as well as written.
>
> https://lore.kernel.org/linux-mm/165490039431.944052.12458624139225785964.stgit@omen/
Oops, I am stucked in debugging the qemu hung issue, not noticed it has
been fixed.
Thanks Matthew.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-11 15:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-11 13:34 [PATCH] mm: fix is_pinnable_page return value Zhangfei Gao
2022-06-11 14:56 ` Matthew Wilcox
2022-06-11 15:49 ` Zhangfei Gao
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 read-only IMAP folder(s) and NNTP newsgroup(s).