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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 6 Jun 2022 15:08:09 +0200 From: Jan Kara <jack@...e.cz> To: Matthew Wilcox <willy@...radead.org> Cc: Jan Kara <jack@...e.cz>, Jan Kara <jack@...e.com>, tytso@....edu, Andreas Dilger <adilger.kernel@...ger.ca>, linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org Subject: Re: [PATCH 1/3] quota: Prevent memory allocation recursion while holding dq_lock On Mon 06-06-22 13:42:10, Matthew Wilcox wrote: > On Mon, Jun 06, 2022 at 10:03:34AM +0200, Jan Kara wrote: > > On Sun 05-06-22 15:38:13, Matthew Wilcox (Oracle) wrote: > > > As described in commit 02117b8ae9c0 ("f2fs: Set GF_NOFS in > > > read_cache_page_gfp while doing f2fs_quota_read"), we must not enter > > > filesystem reclaim while holding the dq_lock. Prevent this more generally > > > by using memalloc_nofs_save() while holding the lock. > > > > > > Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org> > > > > This is definitely a good cleanup to have and seems mostly unrelated to the > > rest. I'll take it rightaway into my tree. Thanks for the patch! > > Thanks! It's really a pre-requisite for the second patch; I haven't > seen anywhere in the current codebase that will have a problem. All > the buffer_heads are allocated with GFP_NOFS | __GFP_NOFAIL (in > grow_dev_page()). Yes, I understand. But as f2fs case shows, there can be fs-local allocations that may be impacted. And it is good to have it documented in the code that dq_lock is not reclaim safe to avoid bugs like f2fs had in the future. Honza -- Jan Kara <jack@...e.com> SUSE Labs, CR
Powered by blists - more mailing lists