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>] [day] [month] [year] [list]
Message-ID: <96b9726a-4e43-bcf3-a27f-8fb7aa4a170b@virtuozzo.com>
Date:   Mon, 9 Aug 2021 10:51:45 +0300
From:   Vasily Averin <vvs@...tuozzo.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org, kernel@...nvz.org
Subject: [PATCH] mm: use in_task() in alloc_pages()

obsoleted in_interrupt() includes task context with enabled BH,
it's better to use in_task() instead.

Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
---
 mm/mempolicy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index e32360e..2f8ee67 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2231,7 +2231,7 @@ struct page *alloc_pages(gfp_t gfp, unsigned order)
 	struct mempolicy *pol = &default_policy;
 	struct page *page;
 
-	if (!in_interrupt() && !(gfp & __GFP_THISNODE))
+	if (in_task() && !(gfp & __GFP_THISNODE))
 		pol = get_task_policy(current);
 
 	/*
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ