android_kernel_sony_sdm845/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Antoine Tenart 4ac84498fb net: fix a memleak when uncloning an skb dst and its metadata
[ Upstream commit 9eeabdf17fa0ab75381045c867c370f4cc75a613 ]

When uncloning an skb dst and its associated metadata, a new
dst+metadata is allocated and later replaces the old one in the skb.
This is helpful to have a non-shared dst+metadata attached to a specific
skb.

The issue is the uncloned dst+metadata is initialized with a refcount of
1, which is increased to 2 before attaching it to the skb. When
tun_dst_unclone returns, the dst+metadata is only referenced from a
single place (the skb) while its refcount is 2. Its refcount will never
drop to 0 (when the skb is consumed), leading to a memory leak.

Fix this by removing the call to dst_hold in tun_dst_unclone, as the
dst+metadata refcount is already 1.

Fixes: fc4099f172 ("openvswitch: Fix egress tunnel info.")
Cc: Pravin B Shelar <pshelar@ovn.org>
Reported-by: Vlad Buslov <vladbu@nvidia.com>
Tested-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Antoine Tenart <atenart@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-02-16 12:43:54 +01:00
..
acpi ACPI: scan: Use unique number for instance_no 2021-03-30 14:41:41 +02:00
asm-generic hugetlbfs: flush TLBs correctly after huge_pmd_unshare 2021-12-08 08:45:03 +01:00
clocksource
crypto crypto: public_key: fix overflow during implicit conversion 2021-09-22 11:43:03 +02:00
drm drm: mst: Fix query_payload ack reply struct 2020-01-04 13:39:00 +01:00
dt-bindings dt-bindings: reset: meson8b: fix duplicate reset IDs 2020-01-23 08:19:38 +01:00
keys KEYS: user: Align the payload buffer 2019-02-27 10:07:00 +01:00
kvm arm/arm64: KVM: Add PSCI version selection API 2018-05-09 09:50:19 +02:00
linux net: fix information leakage in /proc/net/ptype 2022-02-08 18:15:27 +01:00
math-emu math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning 2019-12-21 10:41:02 +01:00
media media: v4l2-device.h: Explicitly compare grp{id,mask} to zero in v4l2_device macros 2020-02-28 15:42:24 +01:00
memory
misc
net net: fix a memleak when uncloning an skb dst and its metadata 2022-02-16 12:43:54 +01:00
pcmcia
ras
rdma IB/cma: Fix reference count leak when no ipv4 addresses are set 2020-06-03 08:16:33 +02:00
rxrpc
scsi scsi: iscsi: Add iscsi_cls_conn refcount helpers 2021-07-20 16:21:11 +02:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2020-09-23 08:46:10 +02:00
sound ALSA: compress: fix partial_drain completion state 2020-07-22 09:10:45 +02:00
target scsi: target: Fix ordered tag handling 2021-11-26 11:48:41 +01:00
trace memcg: fix a crash in wb_workfn when a device disappears 2021-02-23 13:59:15 +01:00
uapi uapi: fix linux/nfc.h userspace compilation errors 2022-01-05 12:31:25 +01:00
video udlfb: set optimal write delay 2018-09-09 20:01:25 +02:00
xen xen: sync include/xen/interface/io/ring.h with Xen's newest version 2021-12-08 08:45:04 +01:00
Kbuild