Commit 0084712
neigh: let neigh_xmit take skb ownership
[ Upstream commit 4438113 ]
neigh_xmit always releases the skb, except when no neighbour table is
found. But even the first added user of neigh_xmit (mpls) relied on
neigh_xmit to release the skb (or queue it for tx).
sashiko reported:
If neigh_xmit() is called with an uninitialized neighbor table (for
example, NEIGH_ND_TABLE when IPv6 is disabled), it returns -EAFNOSUPPORT
and bypasses its internal out_kfree_skb error path. Because the return
value of neigh_xmit() is ignored here, does this leak the SKB?
Assume full ownership and remove the last code path that doesn't
xmit or free skb.
Fixes: 4fd3d7d ("neigh: Add helper function neigh_xmit")
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260424145843.74055-1-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent d02e2fb commit 0084712
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3161 | 3161 | | |
3162 | 3162 | | |
3163 | 3163 | | |
3164 | | - | |
3165 | | - | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
3166 | 3168 | | |
3167 | 3169 | | |
3168 | 3170 | | |
| |||
3178 | 3180 | | |
3179 | 3181 | | |
3180 | 3182 | | |
3181 | | - | |
3182 | 3183 | | |
3183 | 3184 | | |
3184 | 3185 | | |
| |||
3188 | 3189 | | |
3189 | 3190 | | |
3190 | 3191 | | |
3191 | | - | |
3192 | 3192 | | |
3193 | 3193 | | |
3194 | 3194 | | |
3195 | | - | |
| 3195 | + | |
3196 | 3196 | | |
3197 | 3197 | | |
3198 | 3198 | | |
| |||
0 commit comments