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]
Message-ID: <20250806022849.1415-1-chuguangqing@inspur.com>
Date: Wed, 6 Aug 2025 10:28:48 +0800
From: chuguangqing <chuguangqing@...pur.com>
To: <tytso@....edu>, <adilger.kernel@...ger.ca>
CC: <linux-ext4@...r.kernel.org>, <linux-kernel@...r.kernel.org>, chuguangqing
	<chuguangqing@...pur.com>
Subject: [PATCH 0/1] fs: ext4: use GFP_KERNEL to GFP_NOFS to avoid deadlock

I noticed that in the ext4 file system code, some memory allocations use GFP_NOFS, while others still use GFP_KERNEL. The GFP_NOFS flag is used to prevent file system operations (such as writing back dirty pages) from being triggered during memory allocation, thereby avoiding circular waits when holding certain file system locks. I found functions where the parent function has already used the GFP_NOFS flag for memory allocation, but the child function still uses GFP_KERNEL for memory allocation. This will render the GFP_NOFS used by the parent function ineffective. For the identified functions, their memory allocations should be modified to use the same GFP_NOFS flag as the parent function.

chuguangqing (1):
  fs: ext4: change GFP_KERNEL to GFP_NOFS to avoid deadlock

 fs/ext4/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.43.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ