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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 2 Jul 2020 23:05:10 -0400
From:   Waiman Long <longman@...hat.com>
To:     Dave Chinner <david@...morbit.com>
Cc:     "Darrick J. Wong" <darrick.wong@...cle.com>,
        linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        Qian Cai <cai@....pw>, Eric Sandeen <sandeen@...hat.com>
Subject: Re: [PATCH v5] xfs: Fix false positive lockdep warning with
 sb_internal & fs_reclaim

On 7/2/20 9:07 PM, Dave Chinner wrote:
> On Wed, Jul 01, 2020 at 08:59:23PM -0400, Waiman Long wrote:
>> Suggested-by: Dave Chinner <david@...morbit.com>
>> Signed-off-by: Waiman Long <longman@...hat.com>
>> ---
>>   fs/xfs/xfs_super.c | 12 +++++++++++-
>>   1 file changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
>> index 379cbff438bc..dcc97bad950a 100644
>> --- a/fs/xfs/xfs_super.c
>> +++ b/fs/xfs/xfs_super.c
>> @@ -913,11 +913,21 @@ xfs_fs_freeze(
>>   	struct super_block	*sb)
>>   {
>>   	struct xfs_mount	*mp = XFS_M(sb);
>> +	unsigned long		pflags;
>> +	int			ret;
>>   
>> +	/*
>> +	 * Disable fs reclaim in memory allocation for fs freeze to avoid
>> +	 * causing a possible circular locking dependency lockdep splat
>> +	 * relating to fs reclaim.
>> +	 */
> 	/*
> 	 * The filesystem is now frozen far enough that memory reclaim
> 	 * cannot safely operate on the filesystem. Hence we need to
> 	 * set a GFP_NOFS context here to avoid recursion deadlocks.
> 	 */
>
>> +	current_set_flags_nested(&pflags, PF_MEMALLOC_NOFS);
> memalloc_nofs_save/restore(), please.

Thanks for the comments, I will make the suggested change.

Cheers,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ