diff options
author | Eric Dumazet <[email protected]> | 2012-10-22 09:03:40 +0000 |
---|---|---|
committer | David S. Miller <[email protected]> | 2012-10-22 15:16:07 -0400 |
commit | 3d861f661006606bf159fd6bd973e83dbf21d0f9 (patch) | |
tree | 6f141e16d0d0160b515271cee5fdb896599c133c /tools/perf/util/scripting-engines/trace-event-perl.c | |
parent | 8a6e29d6d037de0dd62fe6648ba9b29866db5416 (diff) |
net: fix secpath kmemleak
Mike Kazantsev found 3.5 kernels and beyond were leaking memory,
and tracked the faulty commit to a1c7fff7e18f59e ("net:
netdev_alloc_skb() use build_skb()")
While this commit seems fine, it uncovered a bug introduced
in commit bad43ca8325 ("net: introduce skb_try_coalesce()), in function
kfree_skb_partial()"):
If head is stolen, we free the sk_buff,
without removing references on secpath (skb->sp).
So IPsec + IP defrag/reassembly (using skb coalescing), or
TCP coalescing could leak secpath objects.
Fix this bug by calling skb_release_head_state(skb) to properly
release all possible references to linked objects.
Reported-by: Mike Kazantsev <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Bisected-by: Mike Kazantsev <[email protected]>
Tested-by: Mike Kazantsev <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions