opnsense-src/sys/compat/linuxkpi/common/include
Tom Coldrick d3befb534b LinuxKPI: Queue skbuffs at tail in __skb_queue_tail
Correct skb_queue_tail to queue the buffer at the tail of the skbuff.
The skbuff is a circular doubly-linked list, and we call with a pointer
to the head of the list.  Thus queueing before the head gives us a
queueing at the tail.

As a motivating factor, the current behaviour (queueing at the head) was
causing frequent kernel panics from my RTL8822BE wireless card, which
uses the rtw88 driver.  Interrupts can cause buffers to be added to the
rtwdev c2h_queue while the queue is being drained in rtw_c2h_work.
Queueing at the head would leave the nascent entry in the linked list
pointing to the old, now freed, memory for the buffer being processed.
When rtw_c2h_work is next called, we try reading this and so panic.

Reviewed by:	emaste, bz
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D44192
2024-03-04 09:33:12 -05:00
..
acpi LinuxKPI: Add acpi_dev_present() function. 2023-12-24 11:20:00 +03:00
asm LinuxKPI: Add x86_vendor field to struct cpuinfo_x86 2023-12-24 11:20:00 +03:00
asm-generic linuxkpi: Add io.h 2022-08-08 15:22:35 +02:00
crypto LinuxKPI: add dummy hash.h and kernel_connect() 2023-05-12 11:21:10 +00:00
linux LinuxKPI: Queue skbuffs at tail in __skb_queue_tail 2024-03-04 09:33:12 -05:00
net LinuxKPI: 802.11: extend ieee80211_key_seq and WLAN_KEY_LEN_* defines 2024-02-03 13:31:50 +00:00
video LinuxKPI: Add video/vga.h header 2023-12-24 11:19:58 +03:00
xen LinuxKPI: Add xen/xen.h header 2023-12-24 11:19:58 +03:00
stdarg.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00