public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Andrew Stellman <astellman@stellman-greene.com>
Cc: Minchan Kim <minchan@kernel.org>,
	 Sergey Senozhatsky <senozhatsky@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] zram: complete parent bio on allocation failure in read_from_bdev_async()
Date: Tue, 7 Apr 2026 23:15:20 +0900	[thread overview]
Message-ID: <adURZzHoFpsLcVhO@google.com> (raw)
In-Reply-To: <20260407123836.6341-2-astellman@stellman-greene.com>

On (26/04/07 08:38), Andrew Stellman wrote:
>  drivers/block/zram/zram_drv.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index af67937..f41f1ca 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -1437,12 +1437,17 @@ static void read_from_bdev_async(struct zram *zram, struct page *page,
>  	struct bio *bio;
>  
>  	req = kmalloc_obj(*req, GFP_NOIO);
> -	if (!req)
> +	if (!req) {
> +		parent->bi_status = BLK_STS_IOERR;
> +		bio_endio(parent);
>  		return;
> +	}
>  
>  	bio = bio_alloc(zram->bdev, 1, parent->bi_opf, GFP_NOIO);
>  	if (!bio) {
>  		kfree(req);
> +		parent->bi_status = BLK_STS_IOERR;
> +		bio_endio(parent);
>  		return;
>  	}

This is already fixed.

  reply	other threads:[~2026-04-07 14:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 12:38 [PATCH 0/4] zram: fix four error-handling and input-validation bugs Andrew Stellman
2026-04-07 12:38 ` [PATCH 1/4] zram: complete parent bio on allocation failure in read_from_bdev_async() Andrew Stellman
2026-04-07 14:15   ` Sergey Senozhatsky [this message]
2026-04-07 12:38 ` [PATCH 2/4] zram: call bio_endio() on early return in zram_bio_discard() Andrew Stellman
2026-04-07 14:14   ` Sergey Senozhatsky
2026-04-07 12:38 ` [PATCH 3/4] zram: reject unrecognized type= values in recompress_store() Andrew Stellman
2026-04-07 14:18   ` Sergey Senozhatsky
2026-04-07 12:38 ` [PATCH 4/4] zram: add init_done() guard to algorithm_params_store() Andrew Stellman
2026-04-07 14:14   ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adURZzHoFpsLcVhO@google.com \
    --to=senozhatsky@chromium.org \
    --cc=astellman@stellman-greene.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox