Re: [PATCH v2 0/3] fix bugs when enable route_localnet

2019-06-24 Thread Zhiqiang Liu
On 2019/6/25 0:03, David Miller wrote: > From: luoshijie > Date: Tue, 18 Jun 2019 15:14:02 + > >> From: Shijie Luo >> >> When enable route_localnet, route of the 127/8 address is enabled. >> But in some situations like arp_announce=2, ARP requests or reply >> work abnormally. >> >> This p

Re: [PATCH v2 0/3] fix bugs when enable route_localnet

2019-06-23 Thread Zhiqiang Liu
> From: Zhiqiang Liu > Date: Sat, 22 Jun 2019 16:41:49 +0800 > >> Friendly ping ... > > I'm not applying this patch series without someone reviewing it. > Of course, all patches should be reviewd before deciding whether to apply. In v2, we add a couple of test f

Re: [PATCH v2 0/3] fix bugs when enable route_localnet

2019-06-22 Thread Zhiqiang Liu
Friendly ping ... > From: Shijie Luo > > When enable route_localnet, route of the 127/8 address is enabled. > But in some situations like arp_announce=2, ARP requests or reply > work abnormally. > > This patchset fix some bugs when enable route_localnet. > > Change History: > V2: > - Change

Re: [PATCH net] inet_connection_sock: remove unused parameter of reqsk_queue_unlink func

2019-06-05 Thread Zhiqiang Liu
>>>> small cleanup: "struct request_sock_queue *queue" parameter of >>>> reqsk_queue_unlink >>>> func is never used in the func, so we can remove it. >>>> >>>> Signed-off-by: Zhiqiang Liu >>> >>> Applied, t

Re: [PATCH net] inet_connection_sock: remove unused parameter of reqsk_queue_unlink func

2019-06-05 Thread Zhiqiang Liu
> From: Zhiqiang Liu > Date: Wed, 5 Jun 2019 18:49:49 +0800 > >> small cleanup: "struct request_sock_queue *queue" parameter of >> reqsk_queue_unlink >> func is never used in the func, so we can remove it. >> >> Signed-off-by: Zhiqiang Liu >

[PATCH net v2] inet_connection_sock: remove unused parameter of reqsk_queue_unlink func

2019-06-05 Thread Zhiqiang Liu
small cleanup: "struct request_sock_queue *queue" parameter of reqsk_queue_unlink func is never used in the func, so we can remove it. Signed-off-by: Zhiqiang Liu Signed-off-by: Mao Wenan Reviewed-by: Eric Dumazet --- V1->V2: add partner signatures net/ipv4/inet_connecti

[PATCH net] inet_connection_sock: remove unused parameter of reqsk_queue_unlink func

2019-06-05 Thread Zhiqiang Liu
small cleanup: "struct request_sock_queue *queue" parameter of reqsk_queue_unlink func is never used in the func, so we can remove it. Signed-off-by: Zhiqiang Liu --- net/ipv4/inet_connection_sock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [PATCH iproute2 v3] ipnetns: use-after-free problem in get_netnsid_from_name func

2019-05-06 Thread Zhiqiang Liu
> On Sat, 4 May 2019 15:26:25 +0800 > Zhiqiang Liu wrote: > >> From: Zhiqiang Liu >> >> Follow the following steps: >> # ip netns add net1 >> # export MALLOC_MMAP_THRESHOLD_=0 >> # ip netns list >> then Segmentation fault (core dumped) will oc

[PATCH iproute2 v4] ipnetns: use-after-free problem in get_netnsid_from_name func

2019-05-04 Thread Zhiqiang Liu
From: Zhiqiang Liu Follow the following steps: # ip netns add net1 # export MALLOC_MMAP_THRESHOLD_=0 # ip netns list then Segmentation fault (core dumped) will occur. In get_netnsid_from_name func, answer is freed before rta_getattr_u32(tb[NETNSA_NSID]), where tb[] refers to answer`s content

Re: [PATCH iproute2 v3] ipnetns: use-after-free problem in get_netnsid_from_name func

2019-05-04 Thread Zhiqiang Liu
> On 5/4/19 1:26 AM, Zhiqiang Liu wrote: >> >> diff --git a/ip/ipnetns.c b/ip/ipnetns.c >> index 430d884..d72be95 100644 >> --- a/ip/ipnetns.c >> +++ b/ip/ipnetns.c >> @@ -107,7 +107,7 @@ int get_netnsid_from_name(const char *name) >> struc

[PATCH iproute2 v3] ipnetns: use-after-free problem in get_netnsid_from_name func

2019-05-04 Thread Zhiqiang Liu
From: Zhiqiang Liu Follow the following steps: # ip netns add net1 # export MALLOC_MMAP_THRESHOLD_=0 # ip netns list then Segmentation fault (core dumped) will occur. In get_netnsid_from_name func, answer is freed before rta_getattr_u32(tb[NETNSA_NSID]), where tb[] refers to answer`s content

Re: [PATCH v2] ipnetns: use-after-free problem in get_netnsid_from_name func

2019-05-04 Thread Zhiqiang Liu
> Hi, > > On Mon, Apr 29, 2019 at 03:38:39PM +0800, Zhiqiang Liu wrote: >> From: Zhiqiang Liu >> >> Follow the following steps: >> # ip netns add net1 >> # export MALLOC_MMAP_THRESHOLD_=0 >> # ip netns list >> then Segmentation fault (core dump

[PATCH net v3] vxlan: Don't call gro_cells_destroy() before device is unregistered

2019-03-16 Thread Zhiqiang Liu
d to fully respect the RCU rules, and thus must remove the gro_cells_destroy() call or risk use after-free. Fixes: 58ce31cca1ff ("vxlan: GRO support at tunnel layer") Signed-off-by: Suanming.Mou Suggested-by: Eric Dumazet Reviewed-by: Stefano Brivio Reviewed-by: Zhiqiang Liu --- V1->V

Re: [PATCH v2] vxlan: remove the redundant gro_cells_destroy() calling.

2019-03-15 Thread Zhiqiang Liu
> On Sat, 16 Mar 2019 13:24:39 +0800 > Zhiqiang Liu wrote: > >> I have updated the commit message as suggested by Eric. Even though I have >> read >> Documentation/networking/netdev-FAQ.rst as you mentioned. I am now still a >> little >> confused about th

Re: [PATCH v2] vxlan: remove the redundant gro_cells_destroy() calling.

2019-03-15 Thread Zhiqiang Liu
t;>>> From: Eric Dumazet >>>>> Date: Fri, 15 Mar 2019 09:06:25 -0700 >>>>> >>>>>> >>>>>> >>>>>> On 03/15/2019 08:28 AM, Stefano Brivio wrote: >>>>>>> On Fri, 15 Mar 2019 23:18:

Re: [PATCH v2] vxlan: remove the redundant gro_cells_destroy() calling.

2019-03-15 Thread Zhiqiang Liu
>>> On 03/15/2019 08:28 AM, Stefano Brivio wrote: >>>> On Fri, 15 Mar 2019 23:18:52 +0800 >>>> Zhiqiang Liu wrote: >>>> >>>> >>>> NACK, please read my and Eric's comments to v1 -- giving me more than 23 >>>>

[PATCH v2] vxlan: remove the redundant gro_cells_destroy() calling.

2019-03-15 Thread Zhiqiang Liu
any() -> ndo_uninit() -> gro_cells_destroy() Signed-off-by: Suanming.Mou Reviewed-by: Zhiqiang Liu Reviewed-by: Stefano Brivio --- drivers/net/vxlan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 077f1b9f2761..d76dfed8d9

Re: [PATCH] vxlan: remove the redundant gro_cells_destroy() calling.

2019-03-15 Thread Zhiqiang Liu
> On Fri, 15 Mar 2019 18:06:45 +0800 > Zhiqiang Liu wrote: > >> From: "Suanming.Mou" >> >> With ad6c9986bcb6, GRO cells will be destroyed in vxlan_uninit. > > Thanks for cleaning this up. > > I think it would be nice if you could actually e

[PATCH] vxlan: remove the redundant gro_cells_destroy() calling.

2019-03-15 Thread Zhiqiang Liu
From: "Suanming.Mou" With ad6c9986bcb6, GRO cells will be destroyed in vxlan_uninit. Fixes: ad6c9986bcb6 ("vxlan: Fix GRO cells race condition between receive and link delete") Signed-off-by: Suanming.Mou --- drivers/net/vxlan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

Re: [PATCH v2] net: fix IPv6 prefix route residue

2019-02-11 Thread Zhiqiang Liu
> From: Zhiqiang Liu > Date: Mon, 11 Feb 2019 10:57:46 +0800 > >> From: Zhiqiang Liu >> >> Follow those steps: >> # ip addr add 2001:123::1/32 dev eth0 >> # ip addr add 2001:123:456::2/64 dev eth0 >> # ip addr del 2001:123::1/32 dev eth0 >>

[PATCH v2] net: fix IPv6 prefix route residue

2019-02-10 Thread Zhiqiang Liu
From: Zhiqiang Liu Follow those steps: # ip addr add 2001:123::1/32 dev eth0 # ip addr add 2001:123:456::2/64 dev eth0 # ip addr del 2001:123::1/32 dev eth0 # ip addr del 2001:123:456::2/64 dev eth0 and then prefix route of 2001:123::1/32 will still exist. This is because ipv6_prefix_equal

Re: [PATCH] net: fix IPv6 prefix route residue

2019-02-10 Thread Zhiqiang Liu
> On 2/3/19 9:04 AM, David Miller wrote: >> From: Zhiqiang Liu >> Date: Sun, 3 Feb 2019 14:10:31 +0800 >> >>> @@ -1165,7 +1165,8 @@ enum cleanup_prefix_rt_t { >>> list_for_each_entry(ifa, &idev->addr_list, if_list) { >>>

[PATCH] net: fix IPv6 prefix route residue

2019-02-02 Thread Zhiqiang Liu
From: Zhiqiang Liu Follow those steps: # ip addr add 2001:123::1/32 dev eth0 # ip addr add 2001:123:456::2/64 dev eth0 # ip addr del 2001:123::1/32 dev eth0 # ip addr del 2001:123:456::2/64 dev eth0 and then prefix route of 2001:123::1/32 will still exist. This is because ipv6_prefix_equal