freebsd-src/sys/compat
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
..
freebsd32 Abstract UIO allocation and deallocation. 2024-02-10 11:38:04 -05:00
ia32 sysentvec: add SV_SIGSYS flag 2023-10-03 01:30:52 +03:00
lindebugfs sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
linprocfs linprocfs: Avoid using a sysctl to get the CPU model string 2024-01-04 08:39:53 -05:00
linsysfs linsysfs(5): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux linux: require vnet(9) context in ifname_bsd_to_linux_name() 2024-03-03 12:56:58 -08:00
linuxkpi LinuxKPI: Queue skbuffs at tail in __skb_queue_tail 2024-03-04 09:33:12 -05:00
x86bios sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00