From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] sock: fix sg page frag coalescing in sk_alloc_sg Date: Mon, 23 Jul 2018 21:29:25 -0700 (PDT) Message-ID: <20180723.212925.1494040388709274706.davem@davemloft.net> References: <20180723203754.4041-1-daniel@iogearbox.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davejwatson@fb.com, borisp@mellanox.com, john.fastabend@gmail.com To: daniel@iogearbox.net Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:53410 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388225AbeGXFd4 (ORCPT ); Tue, 24 Jul 2018 01:33:56 -0400 In-Reply-To: <20180723203754.4041-1-daniel@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: From: Daniel Borkmann Date: Mon, 23 Jul 2018 22:37:54 +0200 > Current sg coalescing logic in sk_alloc_sg() (latter is used by tls and > sockmap) is not quite correct in that we do fetch the previous sg entry, > however the subsequent check whether the refilled page frag from the > socket is still the same as from the last entry with prior offset and > length matching the start of the current buffer is comparing always the > first sg list entry instead of the prior one. > > Fixes: 3c4d7559159b ("tls: kernel TLS support") > Signed-off-by: Daniel Borkmann > Acked-by: Dave Watson Applied and queued up for -stable, thanks Daniel.