Files
linux-stable-mirror/include/net
Jeremy Kerr a3c8fa54e9 net: mctp: take ownership of skb in mctp_local_output
[ Upstream commit 3773d65ae5 ]

Currently, mctp_local_output only takes ownership of skb on success, and
we may leak an skb if mctp_local_output fails in specific states; the
skb ownership isn't transferred until the actual output routing occurs.

Instead, make mctp_local_output free the skb on all error paths up to
the route action, so it always consumes the passed skb.

Fixes: 833ef3b91d ("mctp: Populate socket implementation")
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240220081053.1439104-1-jk@codeconstruct.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-06 14:45:06 +00:00
..
2022-09-30 18:17:17 -07:00
2023-11-20 11:52:15 +01:00
2024-01-31 16:17:04 -08:00
2023-09-19 12:28:03 +02:00
2023-10-10 22:00:46 +02:00
2023-04-13 16:55:23 +02:00
2023-06-14 11:15:20 +02:00
2024-01-31 16:17:04 -08:00
2024-01-10 17:10:27 +01:00
2023-08-11 12:08:17 +02:00