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] [day] [month] [year] [list]
Message-ID: <bc25ec40-bda3-44d6-b9c0-d27f7b35b7cb@cs.wisc.edu>
Date: Wed, 25 Jun 2025 13:51:33 -0500
From: Junxuan Liao <ljx@...wisc.edu>
To: Jan Kara <jack@...e.cz>
Cc: linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-fsdevel@...r.kernel.org,
        "Matthew Wilcox (Oracle)"
 <willy@...radead.org>,
        Jonathan Corbet <corbet@....net>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Christian Brauner <brauner@...nel.org>
Subject: Re: [PATCH v2] docs/vfs: update references to i_mutex to i_rwsem

Hi Christian and Jan,

On 6/23/25 6:09 AM, Jan Kara wrote:
> One comment below. Christian, can you please fix it up? Otherwise feel free
> to add:
> 
> Reviewed-by: Jan Kara <jack@...e.cz>
> 
>> diff --git a/Documentation/filesystems/vfs.rst b/Documentation/filesystems/vfs.rst
>> index fd32a9a17bfb..dd9da7e04a99 100644
>> --- a/Documentation/filesystems/vfs.rst
>> +++ b/Documentation/filesystems/vfs.rst
>> @@ -758,8 +758,9 @@ process is more complicated and uses write_begin/write_end or
>>  dirty_folio to write data into the address_space, and
>>  writepages to writeback data to storage.
>>  
>> -Adding and removing pages to/from an address_space is protected by the
>> -inode's i_mutex.
>> +Removing pages from an address_space requires holding the inode's i_rwsem
>> +exclusively, while adding pages to the address_space requires holding the
>> +inode's i_mapping->invalidate_lock exclusively.
> 
> I wasn't probably precise enough in my previous comment. This paragraph
> should be:
> 
> Removing pages from an address_space requires holding the inode's i_rwsem
> exclusively and i_mapping->invalidate_lock exclusively. Adding pages to the
> address_space requires either holding inode's i_rwsem exclusively or
> i_mapping->invalidate_lock in shared mode.

Sorry I missed that part. Could you please fix this in the commit?

-- 
Thanks,
Junxuan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ