From: Haishuang Yan <hidden> Date: 2017-12-14 15:25:17
If md is NULL, tun_dst must be freed, otherwise it will cause memory
leak.
Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN")
Cc: William Tu <redacted>
Signed-off-by: Haishuang Yan <redacted>
---
net/ipv4/ip_gre.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: Haishuang Yan <hidden> Date: 2017-12-14 15:25:33
If md is NULL, tun_dst must be freed, otherwise it will cause memory
leak
Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support")
Cc: William Tu <redacted>
Signed-off-by: Haishuang Yan <redacted>
---
net/ipv6/ip6_gre.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: William Tu <hidden> Date: 2017-12-14 18:48:09
On Thu, Dec 14, 2017 at 7:15 AM, Haishuang Yan
[off-list ref] wrote:
quoted hunk
If md is NULL, tun_dst must be freed, otherwise it will cause memory
leak.
Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN")
Cc: William Tu <redacted>
Signed-off-by: Haishuang Yan <redacted>
---
net/ipv4/ip_gre.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
On 2017年12月15日, at 上午2:47, William Tu [off-list ref] wrote:
On Thu, Dec 14, 2017 at 7:15 AM, Haishuang Yan
[off-list ref] wrote:
quoted
If md is NULL, tun_dst must be freed, otherwise it will cause memory
leak.
Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN")
Cc: William Tu <redacted>
Signed-off-by: Haishuang Yan <redacted>
---
net/ipv4/ip_gre.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
I'm not sure about this. Maybe we don't even need to check "if (!md)"
since ip_tun_rx_dst does the memory allocation.
William
Hi, William
I think we need to check “if (!md)”, if md is okay, ip_tunnel_rcv will be responsible to free
tun_dst:
448 drop:
449 if (tun_dst)
450 dst_release((struct dst_entry *)tun_dst);
Thanks.