Re: [PATCH rtw-next 2/6] wifi: rtw89: usb: fix leak in rtw89_usb_write_port()

From: Fedor Pchelkin

Date: Mon Sep 29 2025 - 05:13:01 EST


On Wed, 24. Sep 09:03, Ping-Ke Shih wrote:
> Fedor Pchelkin <pchelkin@xxxxxxxxx> wrote:
> > @@ -305,8 +305,9 @@ static void rtw89_usb_ops_tx_kick_off(struct rtw89_dev *rtwdev, u8 txch)
> > ret = rtw89_usb_write_port(rtwdev, txch, skb->data, skb->len,
> > txcb);
> > if (ret) {
> > - rtw89_err(rtwdev, "write port txch %d failed: %d\n",
> > - txch, ret);
> > + if (ret != -ENODEV)
> > + rtw89_err(rtwdev, "write port txch %d failed: %d\n",
> > + txch, ret);
> >
> > skb_dequeue(&txcb->tx_ack_queue);

Hi, thanks for reviews! I'm in process of addressing the provided
comments.

>
> By the way, during I review this function, txcb->tx_ack_queue is a
> struct sk_buff_head, how about just struct sk_buff *skb?
> (I might ask Bitterblue Smith about this).

tx_ack_queue is implemented like in rtw88, but there is no TX aggregation
in rtw89 yet I guess.

>
> More, since skb here is from mac80211, so ieee80211_free_txskb() would be
> more suitable rather than dev_kfree_skb_any()?

Agree, will do this in a separate patch.

>
> > kfree(txcb);
> > --
> > 2.51.0
> >
>