[PATCH] net: dsa: mv88e6xxx: Fix memleak in mv88e6xxx_region_atu_snapshot

2020-11-09 Thread zhangxiaoxu
When mv88e6xxx_fid_map return error, we lost free the table. Fix it. Fixes: bfb255428966 ("net: dsa: mv88e6xxx: Add devlink regions") Reported-by: Hulk Robot Signed-off-by: zhangxiaoxu --- drivers/net/dsa/mv88e6xxx/devlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

Re: [PATCH] ipv4: set the tcp_min_rtt_wlen range from 0 to u32_max_div_HZ

2019-04-15 Thread zhangxiaoxu (A)
Thank you very much. I have updated the patch: https://lore.kernel.org/netdev/1555379244-71866-1-git-send-email-zhangxiao...@huawei.com/ On 4/16/2019 1:53 AM, Eric Dumazet wrote: On 04/15/2019 12:15 AM, ZhangXiaoxu wrote: There is a UBSAN report as below: UBSAN: Undefined behaviour in net

[PATCH] ipv4: set the tcp_min_rtt_wlen range from 0 to one day

2019-04-15 Thread ZhangXiaoxu
t_wlen Fixes: f672258391b42 ("tcp: track min RTT using windowed min-filter") Signed-off-by: ZhangXiaoxu --- Documentation/networking/ip-sysctl.txt | 1 + net/ipv4/sysctl_net_ipv4.c | 5 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/netw

[PATCH] ipv4: set the tcp_min_rtt_wlen range from 0 to u32_max_div_HZ

2019-04-15 Thread ZhangXiaoxu
t_wlen Fixes: f672258391b42 ("tcp: track min RTT using windowed min-filter") Signed-off-by: ZhangXiaoxu --- net/ipv4/sysctl_net_ipv4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index ba0fc4b..56306b

Re: [PATCH] ipvs: Fix signed integer overflow when setsockopt timeout

2019-01-24 Thread zhangxiaoxu (A)
ping. On 1/14/2019 8:15 PM, Simon Horman wrote: On Thu, Jan 10, 2019 at 04:39:06PM +0800, ZhangXiaoxu wrote: There is a UBSAN bug report as below: UBSAN: Undefined behaviour in net/netfilter/ipvs/ip_vs_ctl.c:2227:21 signed integer overflow: -2147483647 * 1000 cannot be represented in type 

Re: [PATCH] ipvs: Fix signed integer overflow when setsockopt timeout

2019-01-13 Thread zhangxiaoxu (A)
ping? On 1/10/2019 4:39 PM, ZhangXiaoxu wrote: There is a UBSAN bug report as below: UBSAN: Undefined behaviour in net/netfilter/ipvs/ip_vs_ctl.c:2227:21 signed integer overflow: -2147483647 * 1000 cannot be represented in type 'int' Reproduce program: #include

[PATCH] ipvs: Fix signed integer overflow when setsockopt timeout

2019-01-10 Thread ZhangXiaoxu
f the timeout value is negative or max than 'INT_MAX / HZ'. Signed-off-by: ZhangXiaoxu --- net/netfilter/ipvs/ip_vs_ctl.c | 13 + 1 file changed, 13 insertions(+) diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 432141f..444aaca 100644 --

[PATCH] bpf: fix shift overflow in ___bpf_prog_run

2019-01-07 Thread ZhangXiaoxu
l(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, &sock_fprog); printf("%d\n", ret); return 0; } Make sure the right operand not greater than or equal to the width of the promoted left operand when do shift operation. Signed-off-by: ZhangXiaoxu