Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3388863imm; Sun, 19 Aug 2018 19:57:38 -0700 (PDT) X-Google-Smtp-Source: AA+uWPylbKfP/JWd+ADO6ilbD2Qupj8iRiy2q+bOdycaZ5vxd4+Wwy0rH9q6ay9wLfYMvV+qOHoA X-Received: by 2002:a17:902:bd84:: with SMTP id q4-v6mr43891106pls.145.1534733858305; Sun, 19 Aug 2018 19:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534733858; cv=none; d=google.com; s=arc-20160816; b=mijLysx52vuzzlvltLP7hMEsvnmVS3OB5+ditNLYXC6nbMpwIp269O0TeIh6thzU6/ WAV1i/WyONSgNJAqM3f5EPrPLovoXrtDphIgUi7g3UVl1GM4a7ALFPXgrJ+yAQqITKsI HPnowbVOm1uDfjUB2dRngHgCLoIns3/ZA8aazkL+OVDr2YBUQUKlLVHElmxxTgNIDPrs QjJtyPLF52eJH9pEtJD+GVvj0+F6+k48tQDj57Q8OkZ38GdmRcT6eRY8hF8mnjuusQ2I +1dgL5YHcnQLrz1e1fzkTB4KLgMJ1mGE0hrxCt0sF8+4i0RZRKejArsdTIBJVHxaUh5a mocQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=yoba+FksuiXWE7mu8ocxY5gLhNxXu69pq1qq/EnD+kk=; b=juXEgCvXqtnJWNsGlyqiVxmEE3hmw3ZTW4lo4QyapVgXXL8z1A6dWNzCVRNK+7iICi R2wUiku5IUFy4X/tNn0fwgiW7gfQSz0lV6hSvkrUjxKJsCPw2RNt9QSFTBoYyzeZGC8L z6GKg8WurJvIBDLU3fjlvFe9Kb4im7Vvi85BTnkY3e7L+iMEO9AWj3DhBU1ASI3MC9/U WjtH3Fy/laPABdXMK6O6c4Z2RxdqI+RkAAHE8a/Uo+2mqB14E2XqnmH2ZzmRNyLhiYQs EnKebbUjG2T49nwWe1T+JkZTyDG8Dh5idFMYWFeCqvkeRvjX5E9lSztsl7Kou38uC/Qx OeQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si8792089pls.385.2018.08.19.19.57.23; Sun, 19 Aug 2018 19:57:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726438AbeHTGKF (ORCPT + 99 others); Mon, 20 Aug 2018 02:10:05 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:39786 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbeHTGKF (ORCPT ); Mon, 20 Aug 2018 02:10:05 -0400 Received: from localhost (unknown [172.58.41.21]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 8B5C4147494BE; Sun, 19 Aug 2018 19:56:18 -0700 (PDT) Date: Sun, 19 Aug 2018 19:56:17 -0700 (PDT) Message-Id: <20180819.195617.287376807384738076.davem@davemloft.net> To: yanhaishuang@cmss.chinamobile.com Cc: steffen.klassert@secunet.com, kuznet@ms2.inr.ac.ru, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ip6_vti: fix a null pointer deference when destroy vti6 tunnel From: David Miller In-Reply-To: <1534733465-2493-1-git-send-email-yanhaishuang@cmss.chinamobile.com> References: <1534733465-2493-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 19 Aug 2018 19:56:19 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Haishuang Yan Date: Mon, 20 Aug 2018 10:51:05 +0800 > If load ip6_vti module and create a network namespace when set > fb_tunnels_only_for_init_net to 1, then exit the namespace will > cause following crash: ... > This because ip6n->tnls_wc[0] point to fallback device in default, but > in non-default namespace, ip6n->tnls_wc[0] will be NULL, so add the NULL > check comparatively. > > Fixes: e2948e5af8ee ("ip6_vti: fix creating fallback tunnel device for vti6") > Signed-off-by: Haishuang Yan Ugh, applied, thanks.