Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp14518ybg; Mon, 27 Jul 2020 20:15:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyh4f1SpoX2cvNSxX+TsW3gGBNn411yN6H2ynUbp95Y6R+Kq1ZrdFPAPRMKUE0i4ix/qTV+ X-Received: by 2002:a50:e385:: with SMTP id b5mr23693756edm.130.1595906144180; Mon, 27 Jul 2020 20:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595906144; cv=none; d=google.com; s=arc-20160816; b=DapWbCcfo5UqnXzii3UmV5kzDE3mQZZ7EQE2FQzNtuMwG7BO50wPB1NXOisSyf5r4B ekCIrXJXrjXX3OKfrvmjc2x9+87VzcXqgWDLBxQxc7hN8ERrXtbOhC9zm3QjHZPFfFPM ypoHmCg0Ho9QlL1/Xj9Hjk4XMCxahRZdO9FYcE+ROUB8zDpVRfUTOgPbTDakTA2HlSDr hJ4n8Ea7Oe1P+RFQHnaqzNcePYL+dG1bSV590/CyvvwKi041izFE/PfpsS8aaYgqwiXj e/k6C2oOOD9mkyORChOHaf2Kk4ibijW1xWXQOPmB0ceUIotfy+UC5ylhijjHcEf980md Zlag== 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=hz8xM5EG8YqCl30H84RX4Zce87vdHqx8q6aTfAYbNMs=; b=EH7Wzp20lba5BP7Q3qdmCBFu4WKW+lcyTKZf86Ihd7/lIVtVTZ7HjDceqSClkY901a Wd+wwWzzQ9MorJMSQ49ITmJavCZtdLqLa2SI7gNf1SkKGiyiZksHpk2z+2NapuTMZbIE Pwyd2Z0kjuaAQH1X7cdCW+0arnUaHe964xI0M7IR+3jrF2zX4olrmxDPfdRVnxNOcC7g peyPHH/TJYn699u0N7SfOXuxVSsZWPWdP5+92Jf23IL3UWA4RHcqQIdlzICqRyYIburD vGarRjoynx7L3fznEeDtkn74yLV9GGzLc0RsleCcfqekzfowNK3ltJR6uCQQ0Tw3njij LVqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GYq4C1ay; 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 z24si3774985ejr.308.2020.07.27.20.15.22; Mon, 27 Jul 2020 20:15:44 -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=GYq4C1ay; 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 S1726857AbgG1DNG (ORCPT + 99 others); Mon, 27 Jul 2020 23:13:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726620AbgG1DNF (ORCPT ); Mon, 27 Jul 2020 23:13:05 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE6EC061794; Mon, 27 Jul 2020 20:13:05 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id e64so19244056iof.12; Mon, 27 Jul 2020 20:13:05 -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=hz8xM5EG8YqCl30H84RX4Zce87vdHqx8q6aTfAYbNMs=; b=GYq4C1ayueu3YaNY7Q29/QMADd+OnfFRbkYgQdzY2xYHw24Q5vxPc7cTlnABNycv7A 3ghH4tyQe288lCG/sdL/4wqq9iRX/btMuXB4kvpjJziC4yNlWMI76o/Fu7odOOXBb0BJ 2IvO8Dp69DXU2lyoZ/wUp2kq4nDgQV86cjWVg5K3YBu3SyXFc9CUYgD69v5XSE2zWpAy C4qOe91qKjTI3MDp+yZxEAWJQLCS5ZHw7I/9P4VK7sdhEHcwpi35UwS/sd1uB1gtjwcM j6soCuJtM2T3yamDa4n7+1dYMgoo/DJdlGpWKNecJVG/0pEm06zWWG/YdllKhp4zabPC hJ3Q== 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=hz8xM5EG8YqCl30H84RX4Zce87vdHqx8q6aTfAYbNMs=; b=sa3FA/37/QTibXS91eH2tQgmwOV48ckP/U88nusQ+Vn2FAUQgA9nQYJajuqvesk6hn qRHke/vpSs0V1+QcEoKVcsVF824DFBpsrnYVDiNeUNgRcPTH83KOJJiOsHv8dYjIoJ0N V/WcJB7UsFxh1kKkMG9PVRkbxAzo3zSjAQ8Va70C5jHTgszpLAkrX18haJIlrKll3w/P 9f7ZmBXtPDkTjvndsHoyNj0IQngzb0abRGxlTn45CFYjQn/OTrnsINhZ8GVwehlSDKb2 FAAjaZ6ql5ImiaucsSlD3FgVyx8shLBsReXXmuRth8oUGvLmtyjzdXxGKl5kU0/itEfb 1VzQ== X-Gm-Message-State: AOAM5305LYeUlLT+k5BEeWCZhm2J+ZnCwk7XkRztuu3RhjfDpzwSSNH8 9BGEldUckysORtzaAZIWkP4f8Mj8acfMUmSta+yuqgXr X-Received: by 2002:a02:1d04:: with SMTP id 4mr30893707jaj.16.1595905985110; Mon, 27 Jul 2020 20:13:05 -0700 (PDT) MIME-Version: 1.0 References: <20200727033810.28883-1-gaurav1086@gmail.com> <20200728021348.4116-1-gaurav1086@gmail.com> In-Reply-To: <20200728021348.4116-1-gaurav1086@gmail.com> From: Cong Wang Date: Mon, 27 Jul 2020 20:12:53 -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 Mon, Jul 27, 2020 at 7:14 PM Gaurav Singh wrote: > > Add return to fix build issue. Haven't reproduced this issue at > my end. > > My hypothesis is this: In function: ip6_xmit(), we have > const struct ipv6_pinfo *np = inet6_sk(sk); which returns NULL. > > Further down the function, there's a check: > if (np) hlimit = hp->htop_limit This check exists before git history, at that time 'sk' could be NULL, hence 'np', so it does not mean it is still necessary now. I looked at all callers of ip6_xmit(), I don't see how it is called with a non-full socket, neither 'sk' could be NULL after commit b30bd282cbf5c46247a279a2e8d2aae027d9f1bf ("[IPV6]: ip6_xmit: remove unnecessary NULL ptr check"). Thanks.