From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=211.75.126.72 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796525601; b=E1u63xFNHNKQKc7c4A2attTTW2nThMdDC5E21DgA1Jt5y1CzeAe69YC+p3hIJbVv7UIC yv4ByuZXiyGrv9bBYxaf5Wlgr3jGqxCoK/S4XCRQ5NmgCBHdl7QzYpTRmx8YuzfE8B4iW nsXHFcAkA6RNOLccPrlb4oFWiE9Yr5pjapx6ONNE2KqfYKmpbtQTDWiBghiWdZWanujUh 3JlqtgYi7Dz+MV3abksEsgWfd+eu//r5e9Khnos39B1O62oVMCN66aHkEhxFP8mdFz1Ar DJPW+Qu3P8rZNZtfyTafRcY3MPDyMs7GKn45m2RMwDpHkXBgxd9+68joF8b3uc6JA5Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796525601; h=DMARC-Filter:X-SpamFilter-By:DKIM-Signature:Received:Received: Received:Received:From:To:CC:Subject:Thread-Topic:Thread-Index:Date: Message-ID:References:In-Reply-To:Accept-Language:Content-Language: x-originating-ip:Content-Type:Content-Transfer-Encoding:MIME-Version; bh=pJhw8y2Xw8LfzAX8NLAKEG1hQTSjFyMzHnlTm1o9i6k=; b=dfQ3L3bMDy9vaIi2zeHuItp7eqAxlYJWXUCMEYQ3Su3kgve+4tolpLQupaPKsUmYCSTy e7NH6awBuGm2yuUmwBpE2hLCI2SpbMf0nXXdSLvgtDfGlB3w1wDtaVLKCxI5/c5jnTy+f Pm8m7Q4oPZv4/1bSwQCgWFLz4+1UylhL3vjf7q/QBJFevAKi+l1PQU11U8rP7XJrIhzpu SbwOTELSDkGdg147V9pcQPEMkNky0I0HRpa8n/j6x7SDm8snHL6rEwOU3S4GV+CVCPXr+ maFkhJhueKuDWxlFPb2XvZNJR/CGhpbWd1c2j4174KelwEFyqrDc2xjvhl9tm5oqweQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=pass header.d=realtek.com header.i=@realtek.com header.a=rsa-sha256 header.s=dkim header.b=tDEa7xk7; arc=none smtp.remote-ip=211.75.126.72 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F005606A31F; Sun, 6 Dec 2026 02:53:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2F005606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=realtek.com header.i=@realtek.com header.a=rsa-sha256 header.s=dkim header.b=tDEa7xk7 X-SpamFilter-By: ArmorX SpamTrap 5.80 with qID 6B62qgthF4049654, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realtek.com; s=dkim; t=1796525562; bh=pJhw8y2Xw8LfzAX8NLAKEG1hQTSjFyMzHnlTm1o9i6k=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:Content-Transfer-Encoding:MIME-Version; b=tDEa7xk79OAitqsITAdfd856/g9SEw220M4ztvRJ2kPcCRPisU1E7hPvxWwpiD/bo mNtt5J8WJA4adYiQCqi8g2MZYNZYTXsauBjxOakE+XJ9ymVG9ie6vvExq22C9cQZ3j jgD7BZkHQEvAx5MDY9RAOipcABzvH7XlRXbq5IUB8G9B8dZBTmJiH1Lbk7l0DA1ORA tfrr6cltABQsNdawR6hFhayTMqLfufi4KJq4A7+JJmBqDxuo1kF5Ywn54RR+BI0I1O QM93h7NZOOjct0KH2JfNkI3NNjP7jIV0B5CM7ZT0znvQ08oavq99G5Jx4n4/NsrxeV AKcGsMojV9Qqw== Received: from mail.realtek.com (rtkexhmbs03.realtek.com.tw[10.21.1.53]) by rtits2.realtek.com.tw (8.15.2/3.29/5.94) with ESMTPS id 6B62qgthF4049654 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 6 Dec 2026 10:52:42 +0800 Received: from RTKEXHMBS05.realtek.com.tw (10.21.1.55) by RTKEXHMBS03.realtek.com.tw (10.21.1.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Sun, 6 Dec 2026 10:52:43 +0800 Received: from RTKEXHMBS06.realtek.com.tw (10.21.1.56) by RTKEXHMBS05.realtek.com.tw (10.21.1.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Sun, 6 Dec 2026 10:52:42 +0800 Received: from RTKEXHMBS06.realtek.com.tw ([fe80::eeeb:c765:ca73:5eef]) by RTKEXHMBS06.realtek.com.tw ([fe80::eeeb:c765:ca73:5eef%10]) with mapi id 15.02.2562.056; Sun, 6 Dec 2026 10:52:42 +0800 From: Ping-Ke Shih To: Wanhui Fu , "sgruszka@redhat.com" , "yhchuang@realtek.com" , "briannorris@chromium.org" , "kvalo@kernel.org" CC: "linux-wireless@vger.kernel.org" , "stable@vger.kernel.org" , Luka Gejak Subject: RE: [PATCH rtw-next v2] wifi: rtw88: Free the H2C skb if PCI TX fails Thread-Topic: [PATCH rtw-next v2] wifi: rtw88: Free the H2C skb if PCI TX fails Thread-Index: AQHdhMLeVdrL96GiJ0KY1rFDuQtI1LdPT9Jg Date: Sun, 6 Dec 2026 02:52:42 +0000 Message-ID: <244bb0ab3a1a47499f0c88d02735978c@realtek.com> References: <20261205141310.2678619-1-fuwh1120@163.com> In-Reply-To: <20261205141310.2678619-1-fuwh1120@163.com> Accept-Language: en-US, zh-TW Content-Language: zh-TW Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Wanhui Fu wrote: > rtw_tx_write_data_h2c_get() allocates an skb before calling > rtw_pci_tx_write_data(). If the ring is full or the mapping > fails, rtw_pci_tx_write_data() returns without queuing the > skb, causing a memory leak. >=20 > Free the skb if rtw_pci_tx_write_data() fails. >=20 > Found it by self-developed static analysis tool and compile- > test passed. >=20 > Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Should be=20 Fixes: aaab5d0e6737 ("rtw88: kick off TX packets once for higher efficiency= ") No need to resend because of this. > Cc: stable@vger.kernel.org > Signed-off-by: Wanhui Fu > Reviewed-by: Luka Gejak Acked-by: Ping-Ke Shih