LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH,v2] ipvs: fix the connection sync failed in some cases

To: Julian Anastasov <ja@xxxxxx>
Subject: Re: [PATCH,v2] ipvs: fix the connection sync failed in some cases
Cc: guodeqing <geffrey.guo@xxxxxxxxxx>, wensong@xxxxxxxxxxxx, horms@xxxxxxxxxxxx, kadlec@xxxxxxxxxxxxx, fw@xxxxxxxxx, davem@xxxxxxxxxxxxx, kuba@xxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx
From: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
Date: Wed, 22 Jul 2020 01:23:27 +0200
On Sun, Jul 19, 2020 at 09:08:39AM +0300, Julian Anastasov wrote:
> 
>       Hello,
> 
> On Thu, 16 Jul 2020, guodeqing wrote:
> 
> > The sync_thread_backup only checks sk_receive_queue is empty or not,
> > there is a situation which cannot sync the connection entries when
> > sk_receive_queue is empty and sk_rmem_alloc is larger than sk_rcvbuf,
> > the sync packets are dropped in __udp_enqueue_schedule_skb, this is
> > because the packets in reader_queue is not read, so the rmem is
> > not reclaimed.
> > 
> > Here I add the check of whether the reader_queue of the udp sock is
> > empty or not to solve this problem.
> > 
> > Fixes: 2276f58ac589 ("udp: use a separate rx queue for packet reception")
> > Reported-by: zhouxudong <zhouxudong8@xxxxxxxxxx>
> > Signed-off-by: guodeqing <geffrey.guo@xxxxxxxxxx>
> 
>       Looks good to me, thanks!
> 
> Acked-by: Julian Anastasov <ja@xxxxxx>
> 
>       Simon, Pablo, this patch should be applied to the nf tree.

Applied, thanks.

> As the reader_queue appears in 4.13, this patch can be backported
> to 4.14, 4.19, 5.4, etc, they all have skb_queue_empty_lockless.

The Fixes: tag should help -stable maintainer pull this into the next
batch. Otherwise, feel free to drop a line to stable@xxxxxxxxxxxxxxx
to request inclusion after this patch hits Linus' tree.

Thanks.

<Prev in Thread] Current Thread [Next in Thread>