Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1016935rwb; Wed, 16 Nov 2022 10:43:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf5HgytZOR4xvv86CbL/zzfu26iSg2tGs1XIHhGHoIp9FGjg7M3RkzQ+Rn+0h7uN8R9h+Hwa X-Received: by 2002:a17:906:2452:b0:7ad:a942:4d6b with SMTP id a18-20020a170906245200b007ada9424d6bmr18430352ejb.379.1668624227980; Wed, 16 Nov 2022 10:43:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668624227; cv=none; d=google.com; s=arc-20160816; b=ztz6MSI+2xe2vXqH1DHxs554g8whWIhbfrQSymQ2pht8rphf49jVyxR6/G6ecIThJ4 PQ3iWezydZQwc7uFryqn9UjtE6gEspHRF1TlMp2jSNFhvbOA2k07dTTYgj+WlshXE1rY qwqhTpOdxPhLvE64HGA86iYDWBj7AmdzAIBZEEfhIYDiSfVzTXCcc4CJbX6OU86+1SM5 WCYAOqyWFMhVcx5+p/OEeKjKVsD+DUoppICTKrlhPfexraMZmcxPn2W7e6dI9fLFDnVB Lg+l47a768bClma/WWp9Ay1u+LDh36Pw4uQe7ldG9i7cvZkFSf4YEbQitAehfcEnCDh6 QoVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3QlE2bOOn3d9ibwxdimqr4/FiU3pKkYhXqcHPHT4Nog=; b=Q8gUX4GO5tiDEDUmwOq40MAYZr2NG3vIWKUtB1xUnQld1UZE0ZObjpisQB3bRnK+5W uuJzT010Y3OQLkdMFFJbORJwpjL07Izr8/Q2eEMk8bgbf5SyeQUrxGLlF2ezq/wTcSRD 5nk8AB/SWTINBZAhGez2j7n0eIJDjq3GGO+QAdsqxj12FEQjtnaXZXJfzLFc5jgggpDR 0elVyWrLpBTS8srGftUnNtV4CUrC3hbiarss5jcJw4zNN3BG0SXwiDQf2WAmH1IgMTly P6Zn7EShyIKeuLb63BhJcLh/wd3rSyqvWH/quqjnCXzB1gRqHXpmHwHi86Xvh0TJhSwV sdsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=MqnUG3fI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a91-20020a509ee4000000b0045c9904fdafsi15014352edf.74.2022.11.16.10.43.25; Wed, 16 Nov 2022 10:43:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=MqnUG3fI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236982AbiKPSQ5 (ORCPT + 90 others); Wed, 16 Nov 2022 13:16:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238854AbiKPSQp (ORCPT ); Wed, 16 Nov 2022 13:16:45 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4F4E6314F; Wed, 16 Nov 2022 10:16:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3QlE2bOOn3d9ibwxdimqr4/FiU3pKkYhXqcHPHT4Nog=; b=MqnUG3fItIqA4aopRIW4CFI+M4 PtCt++JZtk2E0rSA5HFsBG+tI3p2640KnmIq1d/97x+eXOFnmQVchRlszcZvqlvQvkneE/Q1RtIHn ZmnZJa/nhOkhFllZ6XZXGHm3ecE7oFdK3wvkT0A6g6Ek0vX0y1MWFUIG3rvr2fnkRWdwWJhhyyhJL 4RZ9FBu3cmyy/gDSw10IrmdtDwt2GnL6IQ0pdVWR21ciu2zyk/1m+12KzbdwY3GRFZfrfl6JsA6Y6 eU+SMY9P581WLA7Se3c4kUA7Xy/PzAZNM9dRP3z74ZTeYZ+ZTNskyzAEAPhSch0tLef/4O9OH70MK gOBngGMQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovMxn-0004rs-Jg; Wed, 16 Nov 2022 18:16:43 +0000 Date: Wed, 16 Nov 2022 18:16:43 +0000 From: Matthew Wilcox To: Denis Arefev Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, trufanov@swemel.ru, vfh@swemel.ru Subject: Re: [PATCH] namespace: Added pointer check in copy_mnt_ns() Message-ID: References: <20221116091255.84576-1-arefev@swemel.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221116091255.84576-1-arefev@swemel.ru> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 16, 2022 at 12:12:55PM +0300, Denis Arefev wrote: > Return value of a function 'next_mnt' is dereferenced at > namespace.c:3377 without checking for null, > but it is usually checked for this function > > Found by Linux Verification Center (linuxtesting.org) with SVACE. You need to do human analysis, not just send the results from a bot. What conditions can lead to this function returning NULL? Do we already know those conditions can or cannot hold?