Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3134742pxa; Sat, 8 Aug 2020 10:46:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU+WS5QOr/3YJSsydNtBvvJf9z+ZW0TPSYRSG8tvgaG1ZhEjAr+LVt8JHw3DlUKdUpjOGh X-Received: by 2002:a17:906:9392:: with SMTP id l18mr14578429ejx.357.1596908769181; Sat, 08 Aug 2020 10:46:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596908769; cv=none; d=google.com; s=arc-20160816; b=A7m+9z7jsAaLIqA7iCh+8sTw4Fn7Yi63tCo/f7EfuvS7/kR7vzg26MaBLz4XFaBRFF s/2v7nSJpmZVg3SRmYwteGVXNyGXPPGvLEzvuj+ZJP5SOWrSyvZlWdz+YD4OhmEl+evd 7vzbOlU3xw6adLFpAHkNHWhmv6MDOJws1+0OPDfwCaBHZXlRBbYyP7IDeZqs4XkEWosa aB5enh9rrztI3lAODbW799OOK5ChOM53P9Trp5EIIBk7+HEFGBNwwnaz6jbySnV4PFYY SogcbouWUeqgc8Nad0pzynJD7BDYzIrfC8A8+I/CT1Zcn+7PyhE0urPvFnlKtR+hKAV/ 2W5A== 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=Jd2roWdNEMfG+4gvo7ecPuN3gEg3eBvXK66IE/OKjWE=; b=vK6DR6k+QzralVWnwoBs3NUNpuMspq1x0JGQESUUkMf34vGfbct3BlLpr6nYGggUTp GBduWnBfzNLrB0+VOf9yJ/VzpjfnZ5zC0XYKBqIVL9MTmHIv1hApww2VI4EZxjKwiZwK 7Ht0rrOkgzxTvMB+47pmH+Wq0VZ2gieLVuljfSHjg71myTNjbT83NxxaKh6t/cbDoX2F TlIpOXzVXHp26ysqduPmu4yR79oF8oD/+vSZJXN4o9uvWxbZ/+190bSe77CVm5+UVSoA hAfY1vc8ytwEjkrc8onzFAhXMP+smIEUFRvpO+MKLdjPUUuZJrWqHaeAMOG5LIKNUOim 3jRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Q/xJ6Alb"; 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 l18si7634538edw.538.2020.08.08.10.45.46; Sat, 08 Aug 2020 10:46:09 -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="Q/xJ6Alb"; 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 S1726401AbgHHRhl (ORCPT + 99 others); Sat, 8 Aug 2020 13:37:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbgHHRhk (ORCPT ); Sat, 8 Aug 2020 13:37:40 -0400 Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78B8DC061756; Sat, 8 Aug 2020 10:37:40 -0700 (PDT) Received: by mail-il1-x12b.google.com with SMTP id l15so4398461ils.2; Sat, 08 Aug 2020 10:37: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=Jd2roWdNEMfG+4gvo7ecPuN3gEg3eBvXK66IE/OKjWE=; b=Q/xJ6Albug/dh/TXnY1J/dhPZmpKUvB5cALfJoCdN2NdkDaQ61DhMyydWZZe/1xS/6 +YePUHa2cXlO9SV2VKxJo2ur1hnmc7nM9nJVkyM1lpv2n/2H3M/oMnX5HR8oHzUzz8oK zuIkIg6iTm2CN9E4mfevEhpUcegEo+wMcYsWBH5tbxA2WYCc8SOf4jtUtFqPMpq06ISJ 1PBvmxFmUSO86qPY09aXej6XJIpvmFLs9iXbXLW+0wLTTDNV+C1wLqdtSm7XQ/PC+nFk He6M7FTpEwISlHf0MQFCAtpbOqGT5Fdl+3SWQZ8pXc2DHO1uaKwJNrhyUj8adxxJrFqO LsIQ== 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=Jd2roWdNEMfG+4gvo7ecPuN3gEg3eBvXK66IE/OKjWE=; b=KlPH9rj0lGhwyXamovqimDIhe0tehT+ZJ4O275UsdZQJ99GUupW85G/C6Wxj0CgUC2 2VuFvv/7edfiBzHFZ5DtyNanX6mClyMQed1n8PXqvZQoOUDqirzaK9tCjpv3FWHGc8Hl vObZaU41l7z6ItN2RDpv3lFFqmBcj9ffN7i1iJbp61SAGeeI3iQS9NsDQLh4CvV14y0U WBbeYQZWu+4SfEMrvim86y6QaXcY+oaZHt0G+knWbHtkFp/iZFiph8RG29nRSsSgr78A JA4FsN5BVt5iJ1tANGV+n2NIyS8f0HQFLll9rjs/FdNoS/cFWCebUdD6we1sfX5sg8Fe AlaQ== X-Gm-Message-State: AOAM532QiLjeW/hWaJHXJUGMnpRJxFdLRTY8jKuuwwFtrQYou1In+EHj r2DQpPABntZFQqAWs3Ocu2Ylkxgr+x13jqRpwXU= X-Received: by 2002:a05:6e02:f94:: with SMTP id v20mr10495513ilo.268.1596908257845; Sat, 08 Aug 2020 10:37:37 -0700 (PDT) MIME-Version: 1.0 References: <20200728021348.4116-1-gaurav1086@gmail.com> <20200808170653.8515-1-gaurav1086@gmail.com> In-Reply-To: <20200808170653.8515-1-gaurav1086@gmail.com> From: Cong Wang Date: Sat, 8 Aug 2020 10:37:26 -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 , Shaohua Li , "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 Sat, Aug 8, 2020 at 10:07 AM Gaurav Singh wrote: > > This PR fixes a possible segmentation violation. > > In function: ip6_xmit(), we have > const struct ipv6_pinfo *np = inet6_sk(sk); which returns NULL > unconditionally (regardless sk being NULL or not). > > In include/linux/ipv6.h: > > static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk) > { > return NULL; > } > Tell us who will use ip6_autoflowlabel() when CONFIG_IPV6 is disabled. :)