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]
Date:   Mon, 28 Feb 2022 15:51:43 +0000
From:   Johannes Thumshirn <Johannes.Thumshirn@....com>
To:     Niels Dossche <dossche.niels@...il.com>,
        "linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "clm@...com" <clm@...com>,
        "josef@...icpanda.com" <josef@...icpanda.com>,
        "dsterba@...e.com" <dsterba@...e.com>,
        Niels Dossche <niels.dossche@...nt.be>
Subject: Re: [PATCH] btrfs: extend locking to all space_info members accesses

On 25/02/2022 22:21, Niels Dossche wrote:
> bytes_pinned is always accessed under space_info->lock, except in
> btrfs_preempt_reclaim_metadata_space, however the other members are
> accessed under that lock. The reserved member of the rsv's are also
> partially accessed under a lock and partially not. Move all these
> accesses into the same lock to ensure consistency.

Maybe also add a lockdep_assert_held() call to need_preemptive_reclaim().

As of now, it has only two callsites which both hold the lock before
accessing bytes_pinned et al, but better safe then sorry.

Anyways,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ