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: <YKZ5i5P8fL8bgq7G@slm.duckdns.org>
Date:   Thu, 20 May 2021 11:00:27 -0400
From:   Tejun Heo <tj@...nel.org>
To:     Dmitry Monakhov <dmtrmonakhov@...dex-team.ru>
Cc:     linux-kernel@...r.kernel.org, axboe@...nel.dk
Subject: Re: [PATCH] blk-throttle: fix race between submitter and throttler
 thread

Hello, Dmitry.

This generally looks good to me. A couple nits below.

> @@ -277,6 +277,8 @@ static struct bio *__bio_chain_endio(struct bio *bio)
>  {
>  	struct bio *parent = bio->bi_private;
>  
> +	BUG_ON(!bio_flagged(parent, BIO_CHAIN));

Let's do WARN_ON_ONCE().

> @@ -2270,6 +2285,8 @@ bool blk_throtl_bio(struct bio *bio)
>  
>  	td->nr_queued[rw]++;
>  	throtl_add_bio_tg(bio, qn, tg);

Can you add some comment here explaining how now that the bio is added for
throttling, there are two accessors of it and the bio must not be modified
without holding the lock?

Thank you.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ