Thread (4 messages) 4 messages, 3 authors, 2021-02-11

Re: possible deadlock in fs_reclaim_acquire (2)

From: Michal Hocko <mhocko@suse.com>
Date: 2021-02-11 11:06:17
Also in: lkml

Possibly related (same subject, not in this thread)

On Thu 11-02-21 11:22:25, Jan Kara wrote:
On Thu 11-02-21 12:07:29, Hillf Danton wrote:
I haven't received Hillf's email.

[...]
quoted
Fix 71b565ceff37 ("ext4: drop ext4_kvmalloc()") by restoring the
GFP_NOFS introduced in dec214d00e0d ("ext4: xattr inode deduplication").

Note this may be the fix also to possible deadlock
 Reported-by: syzbot+bfdded10ab7dcd7507ae@syzkaller.appspotmail.com
 https://lore.kernel.org/linux-ext4/000000000000563a0205bafb7970@google.com/ (local)
Please no. Ext4 is using scoping API to limit allocations to GFP_NOFS
inside transactions. In this case something didn't work which seems like a
lockdep bug at the first sight but I'll talk to mm guys about it.
Definitely to problem doesn't seem to be in ext4.
Agreed. kvmalloc(NOFS) is not even supported because vmalloc doesn't
support GFP_KERNEL incompatible requests.
								Honza
quoted
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1459,7 +1459,7 @@ ext4_xattr_inode_cache_find(struct inode
 	if (!ce)
 		return NULL;
 
-	ea_data = kvmalloc(value_len, GFP_KERNEL);
+	ea_data = kvmalloc(value_len, GFP_NOFS);
 	if (!ea_data) {
 		mb_cache_entry_put(ea_inode_cache, ce);
 		return NULL;
-- 
Jan Kara [off-list ref]
SUSE Labs, CR
-- 
Michal Hocko
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help