Nikhil P. Rao
2a9ea98846
xsk: Fix fragment node deletion to prevent buffer leak
...
[ Upstream commit 60abb0ac11 ]
After commit b692bf9a75 ("xsk: Get rid of xdp_buff_xsk::xskb_list_node"),
the list_node field is reused for both the xskb pool list and the buffer
free list, this causes a buffer leak as described below.
xp_free() checks if a buffer is already on the free list using
list_empty(&xskb->list_node). When list_del() is used to remove a node
from the xskb pool list, it doesn't reinitialize the node pointers.
This means list_empty() will return false even after the node has been
removed, causing xp_free() to incorrectly skip adding the buffer to the
free list.
Fix this by using list_del_init() instead of list_del() in all fragment
handling paths, this ensures the list node is reinitialized after removal,
allowing the list_empty() to work correctly.
Fixes: b692bf9a75 ("xsk: Get rid of xdp_buff_xsk::xskb_list_node")
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com >
Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com >
Link: https://patch.msgid.link/20260225000456.107806-2-nikhil.rao@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
Stable-dep-of: f7387d6579 ("xsk: Fix zero-copy AF_XDP fragment drop")
Signed-off-by: Sasha Levin <sashal@kernel.org >
2026-03-13 17:20:39 +01:00
..
2024-05-01 18:07:37 +01:00
2026-03-04 07:21:32 -05:00
2024-08-26 09:37:23 -07:00
2024-08-26 09:37:22 -07:00
2024-09-09 13:15:37 -07:00
2026-02-06 16:55:51 +01:00
2026-03-04 07:20:09 -05:00
2026-03-04 07:20:39 -05:00
2026-02-06 16:55:42 +01:00
2025-06-19 15:31:42 +02:00
2025-04-20 10:15:50 +02:00
2025-11-24 10:35:51 +01:00
2024-02-02 10:57:55 -08:00
2024-08-26 09:37:23 -07:00
2024-06-25 11:10:18 +02:00
2025-07-17 18:37:05 +02:00
2025-02-08 09:57:10 +01:00
2025-08-28 16:31:15 +02:00
2024-08-26 09:37:22 -07:00
2024-11-14 11:16:28 +01:00
2026-02-06 16:55:41 +01:00
2024-08-29 11:49:10 -07:00
2024-10-02 17:23:23 -04:00
2025-11-24 10:36:05 +01:00
2024-03-06 21:01:26 +01:00
2025-06-27 11:11:40 +01:00
2024-10-02 17:23:23 -04:00
2025-11-13 15:34:24 -05:00
2024-06-05 10:24:57 +01:00
2025-09-09 18:58:11 +02:00
2025-09-09 18:58:19 +02:00
2024-05-08 10:35:09 +01:00
2024-08-26 09:37:23 -07:00
2024-08-20 15:22:17 -07:00
2024-05-29 17:34:49 -07:00
2025-12-18 13:55:22 +01:00
2024-03-05 19:21:17 -08:00
2024-08-26 09:37:23 -07:00
2024-04-01 21:27:08 -07:00
2024-07-15 09:14:39 -07:00
2024-06-12 17:56:00 -07:00
2024-10-15 17:52:58 -07:00
2024-04-01 10:49:28 +01:00
2025-02-27 04:30:18 -08:00
2024-05-07 01:35:55 +02:00
2024-04-30 18:46:52 -07:00
2024-08-26 09:37:23 -07:00
2024-05-08 10:35:09 +01:00
2024-10-25 10:44:41 +01:00
2024-02-26 18:40:34 -08:00
2025-10-23 16:20:44 +02:00
2024-05-13 18:19:09 -06:00
2025-10-23 16:20:45 +02:00
2024-05-23 14:14:23 -07:00
2025-10-23 16:20:45 +02:00
2024-08-05 16:22:45 -07:00
2024-08-28 17:08:16 -07:00
2025-02-08 09:57:06 +01:00
2026-03-04 07:21:57 -05:00
2024-04-29 13:32:01 +01:00
2026-01-08 10:15:01 +01:00
2024-04-01 10:49:28 +01:00
2024-09-04 16:40:33 -07:00
2026-02-12 13:14:56 +01:00
2026-01-08 10:15:01 +01:00
2024-08-05 16:27:26 -07:00
2026-03-04 07:21:13 -05:00
2024-09-03 11:49:27 +02:00
2025-08-20 18:30:18 +02:00
2025-02-21 14:01:16 +01:00
2024-12-19 18:13:13 +01:00
2024-08-27 10:28:49 +02:00
2024-07-15 08:51:01 -07:00
2024-08-26 09:37:23 -07:00
2024-07-15 08:51:19 -07:00
2025-08-15 12:13:41 +02:00
2025-08-20 18:30:32 +02:00
2024-10-02 17:23:23 -04:00
2024-04-25 08:20:54 -07:00
2024-10-10 15:39:35 +02:00
2024-09-11 15:57:50 -07:00
2024-08-12 17:23:57 -07:00
2025-08-20 18:30:37 +02:00
2024-12-05 14:03:08 +01:00
2025-08-20 18:30:56 +02:00
2025-05-18 08:24:50 +02:00
2024-09-12 21:00:26 -07:00
2024-08-26 09:37:22 -07:00
2024-08-26 09:37:23 -07:00
2024-09-11 20:44:31 -07:00
2024-08-12 17:50:34 -07:00
2024-08-30 22:30:55 +02:00
2024-04-01 10:49:28 +01:00
2025-02-08 09:57:25 +01:00
2025-11-02 22:15:20 +09:00
2024-04-30 18:46:52 -07:00
2024-03-07 21:12:43 -08:00
2024-07-11 18:11:31 -07:00
2024-08-26 09:37:23 -07:00
2024-08-26 09:37:23 -07:00
2024-06-06 15:18:04 +02:00
2025-09-04 15:31:51 +02:00
2026-01-08 10:15:01 +01:00
2024-04-01 11:28:32 +01:00
2024-08-07 10:24:46 +01:00
2024-10-10 15:39:35 +02:00
2025-12-07 06:24:54 +09:00
2024-05-10 18:52:45 -07:00
2024-05-30 18:29:38 -07:00
2024-06-24 16:41:23 -07:00
2024-05-30 18:29:38 -07:00
2024-04-30 13:24:48 +02:00
2024-08-02 17:16:59 -07:00
2025-12-18 13:54:44 +01:00
2025-02-27 04:30:19 -08:00
2024-02-16 09:36:37 +00:00
2024-02-14 10:49:37 +01:00
2024-12-14 20:03:53 +01:00
2025-02-27 04:30:19 -08:00
2024-07-08 14:07:31 -07:00
2024-05-09 20:25:55 -07:00
2025-12-01 11:43:36 +01:00
2024-04-01 10:49:28 +01:00
2025-08-15 12:14:06 +02:00
2024-08-26 09:37:23 -07:00
2026-03-13 17:20:39 +01:00
2025-05-09 09:50:38 +02:00
2025-11-13 15:34:07 -05:00
2025-12-12 18:37:17 +01:00
2026-03-13 17:20:39 +01:00