From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DA44C282C2 for ; Thu, 7 Feb 2019 13:55:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 12D8421907 for ; Thu, 7 Feb 2019 13:55:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ncentric-com.20150623.gappssmtp.com header.i=@ncentric-com.20150623.gappssmtp.com header.b="yr6VJQYN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727003AbfBGNzP (ORCPT ); Thu, 7 Feb 2019 08:55:15 -0500 Received: from mail-ed1-f50.google.com ([209.85.208.50]:46186 "EHLO mail-ed1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbfBGNzO (ORCPT ); Thu, 7 Feb 2019 08:55:14 -0500 Received: by mail-ed1-f50.google.com with SMTP id o10so9022121edt.13 for ; Thu, 07 Feb 2019 05:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncentric-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=vF+uPP4fays8aEUokwZD8/XInlGK5iwhN7Xh57sXUbc=; b=yr6VJQYNvheIZuD8QXxQERCq4gU+ENoY3HybKscWPJpg4PFAo2jW/Nu/nzLRX7ExTE RW3hgiMcmYX7sW2soe7R3g15muEgV3ReUfAElGU8Sv8JcnDUiukSPYEqELWYbEurh8Tt gRQe5DfWlyQX9ibIE1sZ2zahK3+xesjB6wfhmaYurAI57CNJiZcJVDJcpXdbvflqtLI1 pEBRxa4TrfjMyK/zJB+8WNBXr0XLke3OlTx1YV5RAf2CPBZgn3U4rXrlRlnw6Y22tvB5 y8J0qP5YOzfLdzVszcGANwSsnLgHQnXNWQYAq9jcK0rZL9scU0Xj+COqs0aAm3pl9HWe aP/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=vF+uPP4fays8aEUokwZD8/XInlGK5iwhN7Xh57sXUbc=; b=lOjF3jUiP8OFOMx7fQQlDDD2bDRnv64WoVgu1JrcshwIsrCDPWG+qr7UtxitTZJTSq Cha4+KiEmNtyCQUCBmr/fS12nzNvGVtHpyF6XjSXQrj+2YvWRy46HHREm9KTnnnBmVc1 jZ4sHhxFRiQXPgkiooxJu5TFxBdHs/5wKStTtCPhT4gcT8ainPcaOfanRR6M1RxvWf5Z qzSaxq8CSLLCKTiu3BcNst/NxbS6XMXLW4B6/alpkli9N79/zQ11stVORruVvu8bFLCw 93bN85qDbYaUAKDHqZHQtYBcUXmgYLmITRlraw16wZ8abpkcabIv5rpkAc72qGN5GhDA YTOw== X-Gm-Message-State: AHQUAubvHuIe7bo94q3pJIL31DCO7bzshL1/SCzQbbavv6zee0E9ZKBL gHZqMVWVRZfa7LNY0Gz5JTbFJouFyjg= X-Google-Smtp-Source: AHgI3IaC1k4ybUXUTIP1Kp+wmD6v8No4lQ7ehBxRSsjNN1Cuqibdgcj95EoudXt04b5Gk1uBOGn2qw== X-Received: by 2002:aa7:d35a:: with SMTP id m26mr12316676edr.244.1549547712583; Thu, 07 Feb 2019 05:55:12 -0800 (PST) Received: from [192.168.3.176] (d515300d8.static.telenet.be. [81.83.0.216]) by smtp.gmail.com with ESMTPSA id t23sm2748795ejo.63.2019.02.07.05.55.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Feb 2019 05:55:11 -0800 (PST) Subject: Re: Compiler warning To: David Ahern , netdev@vger.kernel.org References: <60f98697-952d-aa39-765f-29736de0c4a2@ncentric.com> From: Koen Vandeputte Message-ID: Date: Thu, 7 Feb 2019 14:55:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 05.02.19 03:55, David Ahern wrote: > On 2/4/19 3:43 AM, Koen Vandeputte wrote: >> Hi All, >> >> I'm seeing following compiler warning during kernel compilation >> (5.0-rc5  and  4.14.96): >> >> >> net/core/dev.c: In function 'validate_xmit_skb_list': >> net/core/dev.c:3405:15: warning: 'tail' may be used uninitialized in >> this function [-Wmaybe-uninitialized] >>     tail->next = skb; >>     ~~~~~~~~~~~^~~~~ >> >> >> Source shows this: >> >> https://elixir.bootlin.com/linux/v5.0-rc5/source/net/core/dev.c#L3387 >> >> Looks like "tail" can get deferenced while it indeed doesn't get >> initialized? Kind regards, Koen >> > same with this one - false positive. head is initialized to NULL. tail > is set on the first pass through the loop. > > What compiler / version is this? Thanks for confirming David. (for both of the warnings) This is seen using GCC 7.4.0 I don't know the policy upstream regarding compiler warnings .. so thought I should report these. :) Regards, Koen