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: <8754d1f7-1180-4a7a-a2c5-40aa9147fad6@linux.alibaba.com>
Date: Tue, 16 Jul 2024 14:50:14 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Zhaoyang Huang <huangzhaoyang@...il.com>
Cc: "zhaoyang.huang" <zhaoyang.huang@...soc.com>, Gao Xiang
 <xiang@...nel.org>, Chao Yu <chao@...nel.org>, Yue Hu <huyue2@...lpad.com>,
 Jeffle Xu <jefflexu@...ux.alibaba.com>, Sandeep Dhavale
 <dhavale@...gle.com>, linux-erofs@...ts.ozlabs.org,
 linux-kernel@...r.kernel.org, steve.kang@...soc.com
Subject: Re: [PATCH] fs: fix schedule while atomic caused by gfp of
 erofs_allocpage



On 2024/7/16 14:46, Gao Xiang wrote:
> 
> 
> On 2024/7/16 14:43, Zhaoyang Huang wrote:
>> On Tue, Jul 16, 2024 at 2:20 PM Gao Xiang <hsiangkao@...ux.alibaba.com> wrote:
>>>
>>>
>>>
> 
> ...
> 
>>>>>
>>>>> I don't see why it's an atomic context,
>>>>> so this patch is incorrect.
>>>> Sorry, I should provide more details. page_cache_ra_unbounded() will
>>>> call filemap_invalidate_lock_shared(mapping) to ensure the integrity
>>>> of page cache during readahead, which will disable preempt.
>>>
>>> Why a rwsem sleepable lock disable preemption?
>> emm, that's the original design of down_read()
> 
> No.
> 
>>
>>> context should be always non-atomic context, which is applied
>>> to all kernel filesystems.
>>   AFAICT, filemap_fault/read have added the folios of readahead to page
>> cache which means the aops->readahead basically just need to map the
>> block to this folios and then launch the bio. The erofs is a little
>> bit different to others as it has to alloc_pages for decompression
>> when doing this.
> 
> Interesting.  The whole .readahead is sleepable, including
> submit block I/Os to storage.

Also, please don't imagine your stack trace if it's a non-upstream
kernel.

> 
> Nacked-by: Gao Xiang <hsiangkao@...ux.alibaba.com>
> 
> Thanks,
> Gao Xiang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ