lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 11 Jun 2022 21:34:42 +0800
From:   Zhangfei Gao <zhangfei.gao@...aro.org>
To:     Minchan Kim <minchan@...nel.org>,
        John Hubbard <jhubbard@...dia.com>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        shameerali.kolothum.thodi@...wei.com
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Zhangfei Gao <zhangfei.gao@...aro.org>
Subject: [PATCH] mm: fix is_pinnable_page return value

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@...aro.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ