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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <89414a3a-5d1a-45d3-a00b-199fa3d3ca78@kernel.org>
Date: Sat, 23 Mar 2024 10:11:26 +0800
From: Chao Yu <chao@...nel.org>
To: Yeongjin Gil <youngjin.gil@...sung.com>, jaegeuk@...nel.org
Cc: linux-f2fs-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
 Sungjong Seo <sj1557.seo@...sung.com>, Sunmin Jeong <s_min.jeong@...sung.com>
Subject: Re: [PATCH] f2fs: Prevent s_writer rw_sem count mismatch in
 f2fs_evict_inode

On 2024/3/22 12:16, Yeongjin Gil wrote:
> If f2fs_evict_inode is called between freeze_super and thaw_super, the
> s_writer rwsem count may become negative, resulting in hang.
> 
> CPU1 CPU2
> 
> f2fs_resize_fs()           f2fs_evict_inode()
>    f2fs_freeze
>      set SBI_IS_FREEZING
>                               skip sb_start_intwrite
>    f2fs_unfreeze
>      clear SBI_IS_FREEZING
>                               sb_end_intwrite
> 
> To solve this problem, the call to sb_end_write is determined by whether
> sb_start_intwrite is called, rather than the current freezing status.
> 
> Reviewed-by: Sungjong Seo <sj1557.seo@...sung.com>
> Reviewed-by: Sunmin Jeong <s_min.jeong@...sung.com>
> Signed-off-by: Yeongjin Gil <youngjin.gil@...sung.com>

Reviewed-by: Chao Yu <chao@...nel.org>

Thanks,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ