Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1288996ybg; Mon, 27 Jul 2020 12:52:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMQB1DIAu0521ghy8uQkIZkNS+73oCQ6OX56xi/3dIH4TPv953YhzlT0jUIea3jaZe1WqK X-Received: by 2002:a05:6402:1c10:: with SMTP id ck16mr23243013edb.72.1595879560365; Mon, 27 Jul 2020 12:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595879560; cv=none; d=google.com; s=arc-20160816; b=kAJKdnbvClvI707ot76ZysRHGqVjioXHFeovTi08x0V/nAVwKwqTv4lc2RaHjyX96c d7oVHOtehZZIWp5+qqvgeX1kVZ5adlknXhp+s4Q1QtdZrsFONHG/IRC9C2/daxjvNRPj 5Cj4FQOYHMfHh148vyV+pAPjVx6QqQDxZYj0dGjdifacgASfvdDuf6oIhsgV6oJqqyIs 9HG9rRxl97AeHLO0r0q5zY2mBfzmiHIJSSjTq0P0jXByIOQisMe+PL4kzHiX5mCr2M94 llWqaO1JYDdzoUY73BR7pI6AC7lDNuwyOGnV0UwZTv0hPNyQSqmUwS6+mGgv2xtE2zVX UXvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kKPEIvRnGmOIiRW3hkgHDbFWruyoPp9+tzWubRQC29M=; b=WukMHsaBWRE+taW8WWkPAE+N1jgLYn21Kjswy2QCzsoJ0FQSU9UEweHE/5Wo7DKAcY YXvhf0paJlGnhEik9nRhJE+NdFaaWtRt9VV/SsP5gyxKRuLeohmh/nnjyNDDr44myw36 im2TQyt026d6X0iJdBl9S00bLp79TmrisNsWGsdSPBLkxz5OB1Ku/X9D0m5yAH7TCAgZ xGJ7/bggOriiPaBpQ1JWfQicLaQ5mQge5Mnroyw4y8Ip1CzKOzSsjjFDoWE38PkN6ldb OxF1CScn3qq71jSHGePjPoXq4P5Rh0RwzsnaJXT2M43XFSXezBq1Cux/4vlIby8JFVlL fZRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eyN6Tfy3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si5162026ejg.240.2020.07.27.12.52.16; Mon, 27 Jul 2020 12:52:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eyN6Tfy3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729045AbgG0Tul (ORCPT + 99 others); Mon, 27 Jul 2020 15:50:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgG0Tuk (ORCPT ); Mon, 27 Jul 2020 15:50:40 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9E1BC061794; Mon, 27 Jul 2020 12:50:40 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id w12so4667245iom.4; Mon, 27 Jul 2020 12:50:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kKPEIvRnGmOIiRW3hkgHDbFWruyoPp9+tzWubRQC29M=; b=eyN6Tfy3dTAC8horMFbjFWcPSq2GlcFnpKV1J/Fdu/CAxMldKyfn3aie6b5gl96tBh y17nXeuS9sKdqESZ0MRUc6kZbyixZUAL/Ml4AcNVbn87nqdFN3JN8i+PSHI0vaSooSZZ ECb90vPwMhJYsJ61kFgedhQko0BeZtphczkSLcU4Rld7mhyVv1nI8PphkEl2RJzUGPW7 R1T5W58nmryzh975BfFoJDGfNd1gA8LpbchBLFgLthQgT1b+gqeRKsaaa3o32LHZ/56E cwS1MOyBqeceDVwyHJeR88hLgAaVrRRAmzR9x7oTUVua8dDTLP4CFlIn//ZyOVbETaqZ vBwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kKPEIvRnGmOIiRW3hkgHDbFWruyoPp9+tzWubRQC29M=; b=hCz9Z7WEtzjXwT7y/zlPG4xF35Btf+hJ79VgcxiK1qrlVrwzfQrKiOMfQgMV6ETsec n4YYdJO4uSmyQYzSHmYZihBP/i8yInbX5gAEzOEBdlT3sFTaHwDT+BZb28omqUMA7iOe MNrCY06VTAv/687mQrbzY5iqgUK1f4T+GZ4gfiA3Mj3/LplkOalK0LG4U66+cnPH2Bsn XX5Btdd/gzgwcnWvIq6bTUiMUJrDw16mjiD6wfBhdN1nyPy7KMKUCfH/LKS0mcAKFSn2 F2KjTa6tFEDA9Ctayf4FCJYu5iG8TRt5WYOxl6wnyt77WCT9KQJwPqplI1TVRqKij1vr nkiw== X-Gm-Message-State: AOAM531+KaxlZz7GnDEVSKCUQVCbpvrQF2oXGx8qoJhNZCOyjVTBSK0I 5/A0A3A27/DXqzmW+XxWbgJ5fk7z+8HCgZV+c1s= X-Received: by 2002:a5d:9b86:: with SMTP id r6mr5734317iom.44.1595879440133; Mon, 27 Jul 2020 12:50:40 -0700 (PDT) MIME-Version: 1.0 References: <20200727033810.28883-1-gaurav1086@gmail.com> In-Reply-To: <20200727033810.28883-1-gaurav1086@gmail.com> From: Cong Wang Date: Mon, 27 Jul 2020 12:50:29 -0700 Message-ID: Subject: Re: [PATCH] [net/ipv6] ip6_output: Add ipv6_pinfo null check To: Gaurav Singh Cc: "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Jakub Kicinski , "open list:NETWORKING [IPv4/IPv6]" , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 26, 2020 at 8:39 PM Gaurav Singh wrote: > > ipv6_pinfo is initlialized by inet6_sk() which returns NULL. Why? It only returns NULL for timewait or request sock, but I don't see how ip6_autoflowlabel() could be called on these sockets. So please explain. > Hence it can cause segmentation fault. Fix this by adding a > NULL check. Which exact call path? Do you have a full stack trace? Thanks.