Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: "Onur Özkan" <work@onurozkan.dev>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Gary Guo <gary@garyguo.net>, Yuan Tan <ytan089@ucr.edu>,
	ojeda@kernel.org, boqun@kernel.org,
	rust-for-linux@vger.kernel.org, zhiyunq@cs.ucr.edu,
	ardalan@uci.edu, pgovind2@uci.edu, dzueck@uci.edu,
	stable@vger.kernel.org
Subject: Re: [PATCH] rust: firmware: return empty slice for zero-size firmware
Date: Fri,  5 Jun 2026 16:11:21 +0300	[thread overview]
Message-ID: <20260605131124.24241-1-work@onurozkan.dev> (raw)
In-Reply-To: <CANiq72nE9H34DzEthWmRSmDxgaDW+XLLbrA=T6ywy=hB5FAMrg@mail.gmail.com>

On Fri, 05 Jun 2026 13:15:32 +0200
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:

> On Fri, Jun 5, 2026 at 11:28 AM Gary Guo <gary@garyguo.net> wrote:
> >
> > Oh right. Arguably the wrong error code, but it does prevent the path from being
> > hit. xz decompression always grow at least 1 page and thus won't hit NULL case
> > as well.
> >
> > So indeed under no paths we will have a sucessful `request_firmware` with
> > `buffer` is NULL.
> 
> If we are not expecting it in practice, then at least a
> `debug_assert!` would be nice, or perhaps even making it an invariant?

I think `debug_assert!` would be nice.

Thanks,
Onur

> 
> Cheers,
> Miguel

      reply	other threads:[~2026-06-05 13:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05  4:11 [PATCH] rust: firmware: return empty slice for zero-size firmware Yuan Tan
2026-06-05  7:10 ` Onur Özkan
2026-06-05  8:13   ` Gary Guo
2026-06-05  9:16     ` Onur Özkan
2026-06-05  9:28       ` Gary Guo
2026-06-05 11:15         ` Miguel Ojeda
2026-06-05 13:11           ` Onur Özkan [this message]

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=20260605131124.24241-1-work@onurozkan.dev \
    --to=work@onurozkan.dev \
    --cc=ardalan@uci.edu \
    --cc=boqun@kernel.org \
    --cc=dzueck@uci.edu \
    --cc=gary@garyguo.net \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=pgovind2@uci.edu \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=ytan089@ucr.edu \
    --cc=zhiyunq@cs.ucr.edu \
    /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