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: <aW3ldtLV_IwIj9QR@infradead.org>
Date: Mon, 19 Jan 2026 00:04:06 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Stephen Zhang <starzhangzsd@...il.com>
Cc: Coly Li <colyli@...as.com>, Christoph Hellwig <hch@...radead.org>,
	kent.overstreet@...ux.dev, axboe@...nel.dk, sashal@...nel.org,
	linux-bcache@...r.kernel.org, linux-kernel@...r.kernel.org,
	zhangshida@...inos.cn
Subject: Re: [PATCH] bcache: fix double bio_endio completion in
 detached_dev_end_io

On Mon, Jan 19, 2026 at 02:53:53PM +0800, Stephen Zhang wrote:
> > >       if (bio->bi_status) {
> > > -             struct cached_dev *dc = container_of(ddip->d,
> > > -                                                  struct cached_dev, disk);
> > > +             struct cached_dev *dc = bio->bi_private;
> > > +
> > >               /* should count I/O error for backing device here */
> > >               bch_count_backing_io_errors(dc, bio);
> > > +             orig_bio->bi_status = bio->bi_status;
> > >       }
> > >
> 
> bio_init_clone must be paired with a bio_uninit() call before the
> memory is freed?

Yes.  At least if you don't want leaks when using blk-group.

But as stated in my initial mail, as far as I can tell this path really
needs a bio_set to avoid spurious failures under memory pressure.  In
which case we'd then do a bio_put in the end_io path.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ