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]
Date:   Mon, 6 Dec 2021 16:43:01 +0100
From:   Michal Koutný <mkoutny@...e.com>
To:     "yukuai (C)" <yukuai3@...wei.com>
Cc:     hch@...radead.org, tj@...nel.org, axboe@...nel.dk,
        cgroups@...r.kernel.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, yi.zhang@...wei.com
Subject: Re: [PATCH v4 2/2] block: cancel all throttled bios in del_gendisk()

On Sat, Dec 04, 2021 at 04:03:53PM +0800, "yukuai (C)" <yukuai3@...wei.com> wrote:
> I was thinking that if there are active blkgs, holding queue_lock will
> ensure blkcg won't be freed.

My take is that the function traverses the whole blkcg tree (from global
root) and nothing prevents concurrent blkcg_css_free() in a possibly
unrelated branch (or queue).

> By the way, does spin_lock can guarantee this since it disables preempt
> like what rcu_read_lock() does?

Yes (but don't quoRTe me on that :-).

(It even isn't issue with a non-preemptible kernel neither but the code
IMO should be generic to allow for different configs -- or as I
mentioned initially, make a comment why the tree traversal is not
affected by concurrent frees.)

Thanks,
Michal

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ