Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109023326
D48723.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
929 B
Referenced Files
None
Subscribers
None
D48723.diff
View Options
diff --git a/sys/contrib/dev/rtw88/debug.h b/sys/contrib/dev/rtw88/debug.h
--- a/sys/contrib/dev/rtw88/debug.h
+++ b/sys/contrib/dev/rtw88/debug.h
@@ -27,6 +27,7 @@
RTW_DBG_SDIO = 0x00040000,
#if defined(__FreeBSD__)
+ RTW_DBG_SKB_LEAK = 0x08000000,
RTW_DBG_IO_RW = 0x10000000,
#endif
RTW_DBG_UNEXP = 0x80000000,
diff --git a/sys/contrib/dev/rtw88/pci.c b/sys/contrib/dev/rtw88/pci.c
--- a/sys/contrib/dev/rtw88/pci.c
+++ b/sys/contrib/dev/rtw88/pci.c
@@ -979,8 +979,18 @@
int ret;
ret = rtw_pci_tx_write_data(rtwdev, pkt_info, skb, queue);
+#if defined(__linux__)
if (ret)
return ret;
+#elif defined(__FreeBSD__)
+ if (ret) {
+ rtw_dbg(rtwdev, RTW_DBG_SKB_LEAK, "%s: rtw_pci_tx_write_data "
+ "returned %d, skb %p (len %u) freed\n",
+ __func__, ret, skb, skb->len);
+ dev_kfree_skb_any(skb);
+ return ret;
+ }
+#endif
ring = &rtwpci->tx_rings[queue];
spin_lock_bh(&rtwpci->irq_lock);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 31, 6:50 PM (5 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16356777
Default Alt Text
D48723.diff (929 B)
Attached To
Mode
D48723: rtw88: prevent skb leak take II
Attached
Detach File
Event Timeline
Log In to Comment