[PATCH v5 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-15 Thread Weilong Chen
n.c:359 [<6839b4d0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: cb626bf566eb ("net-sysfs: Fix reference count leak") Reported-by: Hulk Robot Signed-off-by: Weilong Chen --- net/core/rtnetlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

Re: [PATCH v4 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-15 Thread Weilong Chen
On 2020/7/15 13:45, Cong Wang wrote: > On Tue, Jul 14, 2020 at 6:27 PM Weilong Chen wrote: >> >> When vlan_newlink call register_vlan_dev fails, it might return error >> with dev->reg_state = NETREG_UNREGISTERED. The rtnl_newlink should >> free the memory. But cu

[PATCH v4 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-14 Thread Weilong Chen
n.c:359 [<6839b4d0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: e51fb152318ee6 ("rtnetlink: fix a memory leak when ->newlink fails") Reported-by: Hulk Robot Cc: David S. Miller Signed-off-by: Wei Yongjun Signed-off-by: Weilong Chen --- net/core/rtnetlink.c

[PATCH v3 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-14 Thread Weilong Chen
on.c:359 [<6839b4d0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: e51fb152318ee6 (rtnetlink: fix a memory leak when ->newlink fails) Reported-by: Hulk Robot Cc: David S. Miller Signed-off-by: Wei Yongjun Signed-off-by: Weilong Chen --- net/core/rtnetlink.c | 3 ++- 1

[PATCH v2 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-14 Thread Weilong Chen
.c:359 [<6839b4d0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: commit e51fb152318ee6 (rtnetlink: fix a memory leak when ->newlink fails) Cc: David S. Miller Reported-by: Hulk Robot Signed-off-by: Weilong Chen --- net/core/rtnetlink.c | 3 ++- 1 file changed, 2 inser

Re: [PATCH net-next] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-14 Thread Weilong Chen
On 2020/7/14 3:02, David Miller wrote: > From: Weilong Chen > Date: Mon, 13 Jul 2020 15:55:28 +0800 > >> When vlan_newlink call register_vlan_dev fails, it might return error >> with dev->reg_state = NETREG_UNREGISTERED. The rtnl_newlink should >> free the memory. B

[PATCH net-next] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-13 Thread Weilong Chen
ket.c:672 [<1c30ffe4>] sys_sendmsg+0x5f5/0x780 net/socket.c:2352 [<b71ca6f3>] ___sys_sendmsg+0x11d/0x1a0 net/socket.c:2406 [<07297384>] __sys_sendmsg+0xeb/0x1b0 net/socket.c:2439 [<0eb29b11>] do_syscall_64+0x56/0xa0 arch/x86/entry/commo

[PATCH v2] kernel/fork.c: annotate data races for copy_process

2020-06-22 Thread Weilong Chen
5Ew/aPdYLXfYBQAJ Reported-by: syzbot+52fced2d288f8ecd2...@syzkaller.appspotmail.com Cc: Qian Cai Cc: Oleg Nesterov Cc: Christian Brauner Cc: Marco Elver Signed-off-by: Zefan Li Signed-off-by: Weilong Chen --- kernel/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ker

[PATCH] virtio-mem: Fix build error due to improper use 'select'

2020-06-19 Thread Weilong Chen
ror: https://bugzilla.kernel.org/show_bug.cgi?id=208245 Signed-off-by: Weilong Chen --- drivers/virtio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index 5809e5f5b157..5c92e4a50882 100644 --- a/drivers/virtio/Kconfig +++ b/driv

[PATCH linux-next] kernel/fork.c: annotate data races for copy_process

2020-06-08 Thread Weilong Chen
_do_fork+0xf7/0x790 kernel/fork.c:2430 __do_sys_clone+0xf9/0x130 kernel/fork.c:2585 __se_sys_clone kernel/fork.c:2566 [inline] __x64_sys_clone+0x6c/0x80 kernel/fork.c:2566 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Weilong Chen

Problem of TCP bandwidth drops when change MTU to a small value

2019-01-14 Thread Weilong Chen
Hi, when we change the mtu to a small value, for example, ifconfig eth0 mtu 68, IPERF test shows there's a great bandwidth drop while previous kernel versions don't. Git bisect find the differences is from the patch 28d35bcdd3925e7293408cdb8aa5f2aac5f0d6e3 (net: ipv4: don't let PMTU updates

Kdump kernel start failed with intel_iommu=on

2018-01-23 Thread Weilong Chen
Hi, We came across this problem: Second kernel hang with intel_iommu=on We can reproduce the problem by the following steps: 1. start the kernel with intel_iommu=on 2. ifconfig eth6 up;ifconfig eth8 up.(eth6 is Intel Corporation 82599ES 10-Gigabit and eth8 is Broadcom Limited NetXtreme BCM5719

Kdump kernel start failed with intel_iommu=on

2018-01-23 Thread Weilong Chen
Hi, We came across this problem: Second kernel hang with intel_iommu=on We can reproduce the problem by the following steps: 1. start the kernel with intel_iommu=on 2. ifconfig eth6 up;ifconfig eth8 up.(eth6 is Intel Corporation 82599ES 10-Gigabit and eth8 is Broadcom Limited NetXtreme BCM5719

Re: [PATCH] ipmi: fix unsigned long underflow

2017-08-07 Thread Weilong Chen
imeout: ... ent->timeout -= timeout_period; if (ent->timeout > 0) return; ... The type of timeout_period is long, but ent->timeout is unsigned long. This patch makes the type consistent. Reported-by: Weilong Chen <chenweil...@huawei.com> Signed-off-

Re: [PATCH] ipmi: fix unsigned long underflow

2017-08-07 Thread Weilong Chen
out -= timeout_period; if (ent->timeout > 0) return; ... The type of timeout_period is long, but ent->timeout is unsigned long. This patch makes the type consistent. Reported-by: Weilong Chen Signed-off-by: Corey Minyard --- I like to keep things consistent (though

[PATCH] ipmi: fix unsigned long overflow

2017-07-28 Thread Weilong Chen
, but ent->timeout is unsigned long. This patch makes the type consistent. Signed-off-by: Weilong Chen <chenweil...@huawei.com> --- drivers/char/ipmi/ipmi_msghandler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/ipmi/ipmi_msghandler.c b

[PATCH] ipmi: fix unsigned long overflow

2017-07-28 Thread Weilong Chen
, but ent->timeout is unsigned long. This patch makes the type consistent. Signed-off-by: Weilong Chen --- drivers/char/ipmi/ipmi_msghandler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c i

Re: [PATCH net-next] ixgbevf: fix 'Etherleak' in ixgbevf

2016-12-20 Thread Weilong Chen
to 60 bytes. - Alex On Tue, Dec 20, 2016 at 3:50 AM, Weilong Chen <chenweil...@huawei.com> wrote: Hi, Thanks for you reply. We test you patch, but the problem is still there, it seems do not work. I'm not sure why ixgbe use the limit 17. The kenel use ETH_ZLEN (60) with out FCS. A lot of

Re: [PATCH net-next] ixgbevf: fix 'Etherleak' in ixgbevf

2016-12-20 Thread Weilong Chen
to 60 bytes. - Alex On Tue, Dec 20, 2016 at 3:50 AM, Weilong Chen wrote: Hi, Thanks for you reply. We test you patch, but the problem is still there, it seems do not work. I'm not sure why ixgbe use the limit 17. The kenel use ETH_ZLEN (60) with out FCS. A lot of drivers such as e1000 use it. Any e

Re: [PATCH net-next] ixgbevf: fix 'Etherleak' in ixgbevf

2016-12-20 Thread Weilong Chen
: On Thu, Dec 15, 2016 at 3:40 AM, Weilong Chen <chenweil...@huawei.com> wrote: Nessus report the vf appears to leak memory in network packets. Fix this by padding all small packets manually. And the CVE-2003-0001. https://ofirarkin.files.wordpress.com/2008/11/atstake_etherleak_report.pdf

Re: [PATCH net-next] ixgbevf: fix 'Etherleak' in ixgbevf

2016-12-20 Thread Weilong Chen
: On Thu, Dec 15, 2016 at 3:40 AM, Weilong Chen wrote: Nessus report the vf appears to leak memory in network packets. Fix this by padding all small packets manually. And the CVE-2003-0001. https://ofirarkin.files.wordpress.com/2008/11/atstake_etherleak_report.pdf Signed-off-by: Weilong Chen

[PATCH net-next] ixgbevf: fix 'Etherleak' in ixgbevf

2016-12-15 Thread Weilong Chen
Nessus report the vf appears to leak memory in network packets. Fix this by padding all small packets manually. And the CVE-2003-0001. https://ofirarkin.files.wordpress.com/2008/11/atstake_etherleak_report.pdf Signed-off-by: Weilong Chen <chenweil...@huawei.com> --- drivers/net/ethernet

[PATCH net-next] ixgbevf: fix 'Etherleak' in ixgbevf

2016-12-15 Thread Weilong Chen
Nessus report the vf appears to leak memory in network packets. Fix this by padding all small packets manually. And the CVE-2003-0001. https://ofirarkin.files.wordpress.com/2008/11/atstake_etherleak_report.pdf Signed-off-by: Weilong Chen --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

[PATCH v2] Race between cat /proc/kallsyms and rmmod

2016-01-31 Thread Weilong Chen
modules does. Steps to reproduce: while true; do modprobe xfs; rmmod xfs; done vs while true; do cat /proc/kallsyms >/dev/null; done Signed-off-by: Weilong Chen --- kernel/kallsyms.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 5c5987f..e09d

[PATCH v2] Race between cat /proc/kallsyms and rmmod

2016-01-31 Thread Weilong Chen
modules does. Steps to reproduce: while true; do modprobe xfs; rmmod xfs; done vs while true; do cat /proc/kallsyms >/dev/null; done Signed-off-by: Weilong Chen <chenweil...@huawei.com> --- kernel/kallsyms.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/kallsyms.c b/ke

[PATCH] Race between cat /proc/kallsyms and rmmod

2016-01-30 Thread Weilong Chen
modules does. Steps to reproduce: while true; do modprobe xfs; rmmod xfs; done vs while true; do cat /proc/kallsyms >/dev/null; done ref:http://lkml.iu.edu/hypermail/linux/kernel/0703.1/2582.html https://bugzilla.kernel.org/show_bug.cgi?id=111541 Signed-off-by: Weilong Chen --- kernel/ka

[PATCH] Race between cat /proc/kallsyms and rmmod

2016-01-30 Thread Weilong Chen
modules does. Steps to reproduce: while true; do modprobe xfs; rmmod xfs; done vs while true; do cat /proc/kallsyms >/dev/null; done ref:http://lkml.iu.edu/hypermail/linux/kernel/0703.1/2582.html https://bugzilla.kernel.org/show_bug.cgi?id=111541 Signed-off-by: Weilong Chen <chenweil.