public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	Zenm Chen <zenmchen@gmail.com>,
	"gustavo@embeddedor.com" <gustavo@embeddedor.com>
Cc: "Jes.Sorensen@gmail.com" <Jes.Sorensen@gmail.com>,
	"gustavoars@kernel.org" <gustavoars@kernel.org>,
	"linux-hardening@vger.kernel.org"
	<linux-hardening@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH][next] wifi: rtl8xxxu: Avoid -Wflex-array-member-not-at-end warnings
Date: Wed, 26 Nov 2025 03:26:36 +0000	[thread overview]
Message-ID: <c0d187d6fead4e5387db2a14129be96c@realtek.com> (raw)
In-Reply-To: <475b4336-eed0-4fae-848f-aae26f109606@gmail.com>

Hi Bitterblue,

Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> On 21/11/2025 13:11, Zenm Chen wrote:
> > Gustavo A. R. Silva <gustavo@embeddedor.com> 於 2025年11月21日 週五 下午6:20寫道:
> >>
> >> Hi,
> >>
> >> On 11/21/25 19:06, Zenm Chen wrote:
> >>> Dear maintainers,
> >>>
> >>> With this patch applied, my system always freezes right after the rtl8xxxu
> >>> driver is loaded. is it normal?
> >>
> >> I don't think so... It probably means that struct urb urb; cannot really be
> >> moved to the end of struct rtl8xxxu_rx_urb or struct rtl8xxxu_tx_urb?
> >>
> >> It'd be great if you could share a log.
> >>
> >
> > Hi,
> >
> > Nothing helpful found from the kernel log. Maybe Realtek drivers maintainer
> > Ping-Ke could take a look what is wrong next Monday.
> >
> [...]
> 
> I got something. In my case everything seemed fine until I unplugged the
> wifi adapter. And then the system still worked for a few minutes before
> it froze.
> 

Zenm and I tested below changes which can also reproduce the symptom, so
I wonder driver might assume urb is the first member of struct, but 
unfortunately I can't find that. Could you also help to review if something
I missed? Thanks.


--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
@@ -1942,15 +1942,19 @@ struct rtl8xxxu_vif {
 };

 struct rtl8xxxu_rx_urb {
+       u8 pad[128];
        struct urb urb;
        struct ieee80211_hw *hw;
        struct list_head list;
};

 struct rtl8xxxu_tx_urb {
+       u8 pad[128];
        struct urb urb;
        struct ieee80211_hw *hw;
        struct list_head list;
};

 struct rtl8xxxu_fileops {



  parent reply	other threads:[~2025-11-26  3:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19  9:08 [PATCH][next] wifi: rtl8xxxu: Avoid -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2025-11-21  6:09 ` Ping-Ke Shih
2025-11-21 10:06 ` Zenm Chen
2025-11-21 10:19   ` Gustavo A. R. Silva
2025-11-21 11:11     ` Zenm Chen
2025-11-23 20:29       ` Bitterblue Smith
2025-11-24  6:37         ` Ping-Ke Shih
2025-11-24  8:02           ` Zenm Chen
2025-11-26  3:26         ` Ping-Ke Shih [this message]
2025-12-06 21:53           ` Bitterblue Smith
2025-12-06 23:16             ` Michal Pecio
2025-12-06 23:55               ` Greg KH
2025-12-07  8:05                 ` Michal Pecio
2025-12-08  0:05               ` Bitterblue Smith
2025-11-21 11:12     ` Ping-Ke Shih

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=c0d187d6fead4e5387db2a14129be96c@realtek.com \
    --to=pkshih@realtek.com \
    --cc=Jes.Sorensen@gmail.com \
    --cc=gustavo@embeddedor.com \
    --cc=gustavoars@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rtl8821cerfe2@gmail.com \
    --cc=zenmchen@gmail.com \
    /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