From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] net: always initialize pagedlen Date: Sat, 24 Nov 2018 17:43:36 -0800 (PST) Message-ID: <20181124.174336.2013396951281875471.davem@davemloft.net> References: <20181124192116.27941-1-willemdebruijn.kernel@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, willemb@google.com To: willemdebruijn.kernel@gmail.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:59644 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbeKYMd2 (ORCPT ); Sun, 25 Nov 2018 07:33:28 -0500 In-Reply-To: <20181124192116.27941-1-willemdebruijn.kernel@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Willem de Bruijn Date: Sat, 24 Nov 2018 14:21:16 -0500 > From: Willem de Bruijn > > In ip packet generation, pagedlen is initialized for each skb at the > start of the loop in __ip(6)_append_data, before label alloc_new_skb. > > Depending on compiler options, code can be generated that jumps to > this label, triggering use of an an uninitialized variable. > > In practice, at -O2, the generated code moves the initialization below > the label. But the code should not rely on that for correctness. > > Fixes: 15e36f5b8e98 ("udp: paged allocation with gso") > Signed-off-by: Willem de Bruijn > > --- > > Noticed when rebasing udp zerocopy. I considered merging as part of > that patchset, but this seemed like it should go to net, even if it > does not trigger in practice. > > Merged net with this patch onto net-next with udp zerocopy to verify > that there is no merge conflict. Ok, applied, but not queued for -stable. Let me know if I should -stable this.