回复: [PATCH v3] rust: pci: reject out-of-bounds IRQ vector indices
From: ai qubits
Date: Tue Sep 01 2026 - 06:01:55 EST
Thanks for the review.
Yes, Sophon Zhang is my known identity. I will use the full name in v4.
The explicit map_err() is not needed because TryFromIntError is already
converted to Error as EINVAL. I will simplify it to:
let index = u32::try_from(index)?;
I will also remove the blank line between the trailers.
Best regards,
Sophon
// Reason for Resending
Note: I don't think your messages will be accepted by the mailing
list, since they use HTML. Please switch to plain text -- thanks!
Cheers,
Miguel
Hi Miguel,
Thanks for the reminder. I will resend it in plain text.
Best regards,
Sophon
________________________________________
发件人: ai qubits <aiqubits@xxxxxxxxxxx>
发送时间: 2026年9月1日 0:58
收件人: Miguel Ojeda
抄送: Danilo Krummrich; Bjorn Helgaas; Krzysztof Wilczyński; Miguel Ojeda; Boqun Feng; Gary Guo; Björn Roy Baron; Benno Lossin; Andreas Hindborg; Alice Ryhl; Trevor Gross; Daniel Almeida; Tamir Duberstein; Alexandre Courbot; Onur Özkan; linux-pci@xxxxxxxxxxxxxxx; rust-for-linux@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
主题: 回复: [PATCH v3] rust: pci: reject out-of-bounds IRQ vector indices
Thanks for the review.
Yes, Sophon Zhang is my known identity. I will use the full name in v4.
The explicit map_err() is not needed because TryFromIntError is already
converted to Error as EINVAL. I will simplify it to:
let index = u32::try_from(index)?;
I will also remove the blank line between the trailers.
________________________________
发件人: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>
发送时间: 2026年8月31日 17:50
收件人: aiqubits@xxxxxxxxxxx <aiqubits@xxxxxxxxxxx>
抄送: Danilo Krummrich <dakr@xxxxxxxxxx>; Bjorn Helgaas <bhelgaas@xxxxxxxxxx>; Krzysztof Wilczyński <kwilczynski@xxxxxxxxxx>; Miguel Ojeda <ojeda@xxxxxxxxxx>; Boqun Feng <boqun@xxxxxxxxxx>; Gary Guo <gary@xxxxxxxxxxx>; Björn Roy Baron <bjorn3_gh@xxxxxxxxxxxxxx>; Benno Lossin <lossin@xxxxxxxxxx>; Andreas Hindborg <a.hindborg@xxxxxxxxxx>; Alice Ryhl <aliceryhl@xxxxxxxxxx>; Trevor Gross <tmgross@xxxxxxxxx>; Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>; Tamir Duberstein <tamird@xxxxxxxxxx>; Alexandre Courbot <acourbot@xxxxxxxxxx>; Onur Özkan <work@xxxxxxxxxxxxx>; linux-pci@xxxxxxxxxxxxxxx <linux-pci@xxxxxxxxxxxxxxx>; rust-for-linux@xxxxxxxxxxxxxxx <rust-for-linux@xxxxxxxxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx <linux-kernel@xxxxxxxxxxxxxxx>
主题: Re: [PATCH v3] rust: pci: reject out-of-bounds IRQ vector indices
On Mon, Aug 31, 2026 at 9:17 AM Sophon Z via B4 Relay
<devnull+aiqubits.hotmail.com@xxxxxxxxxx> wrote:
>
> Fixes: 2fb7755b0a7e ("rust: pci: resolve IRQ in index() and embed IrqRequest in IrqVector")
The tag looks good, and there is no need for Cc: stable since this is
from yesterday's -rc1, so that is good.
Nit: we usually don't do newlines between tags.
> Signed-off-by: Sophon Z <aiqubits@xxxxxxxxxxx>
Is this a known identity? Please see:
https://docs.kernel.org/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
> + let index = u32::try_from(index).map_err(|_| EINVAL)?;
Do we need the `.map_err()`?
Thanks!
Cheers,
Miguel