Jeremy Kerr cbebc55cea net: mctp: take ownership of skb in mctp_local_output
[ Upstream commit 3773d65ae5154ed7df404b050fd7387a36ab5ef3 ]

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: 833ef3b91de6 ("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:48:34 +00:00
..
2022-08-09 22:14:02 -07:00
2021-12-16 07:18:35 -08:00
2023-11-20 11:59:34 +01:00
2021-10-15 11:33:08 +01:00
2024-01-31 16:19:01 -08:00
2023-09-06 06:05:59 +01:00
2023-04-22 01:39:41 +02:00
2021-10-13 09:40:46 -07:00
2023-08-25 18:35:09 -07:00
2023-08-22 17:31:18 -07:00
2022-05-11 12:43:10 +01:00
2023-08-29 17:39:15 -07:00
2023-05-11 18:07:05 -07:00
2023-07-14 20:39:30 -07:00
2024-01-31 16:19:01 -08:00
2023-02-16 09:27:07 +01:00
2023-07-28 14:07:59 -07:00
2022-12-12 15:04:39 -08:00
2023-11-20 11:58:56 +01:00
2023-08-02 10:58:26 +01:00
2023-07-19 09:56:49 -07:00