Received: by 2002:a05:6512:2355:0:0:0:0 with SMTP id p21csp206212lfu; Wed, 30 Mar 2022 20:56:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcx+86UfdkgCbYIlJf4VzgDuvbA1vKiu7d+323EMSh9QFJMVXEyPFGranjLI/tERQYWi7Z X-Received: by 2002:a17:903:110c:b0:153:1293:5624 with SMTP id n12-20020a170903110c00b0015312935624mr3003527plh.149.1648698995669; Wed, 30 Mar 2022 20:56:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648698995; cv=none; d=google.com; s=arc-20160816; b=k3kbF7GccAsFewzV/qs5OWlcqhO7gx+59gjaKrfTM/gAS711pWTUjBhqnBSOPP6rXq YZxGI3LfYhoHa1eXpTTq43faqzt9JvET0kXqDheTUbY4MEFjf2qba0Aliof8e7/QAeXg F2Ex5kIJQNAX3FEwPDJtofp8WaV4aXCQHLP67LefedWiOeUSFVPZR09QVh6H636dkdq/ jOrMyusEvlWR539BqluSZT0Vbhk7U9twdIQIe2b2KZWXdChvnjrmLJIoS+T2/4FmAoKH 5SrY2fLPWl1ZZNa6iNJ8jUFd8OCVPTEqXVJwrYjZeiDRpwJGINGSrCjFU0imDaQCu5Nv mKJw== 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=VDwf7xknVsKm4j6m+5m5/wje9BO0M2R51UqnrsEK8uY=; b=y6I+2fhjV1Oz7UAVZTiOM7bCQ8FHGAbyfYJgzp9F//GXIFXXXTPqMNeIaxys+xMH7p 6eIXZpeG5jYx18GoTsnnB2QzfaoIklTNF/hFNWGal7lKVedy5TmagFSoGtwuf8hKFN+u Gqrvmh5B8eB5mLlwPNEM4cmtmLt4ZJz2eaqDB2UYhQksdM2eJpJeYfqOKWN70OZmGAfh jemruznc+DYAp5u2VTufFVLF9FIvta+0wzJjY/AkOaAGdodWV4vCzef8mskEFN4pMz2e TX2pJSyrj15iZasjPkbkkR7PWwzJnNp035bkKBHZuGPLbgdTCJJUclqD7m5od2ucOb9u nrVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=CGZDkgLH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v16-20020a637a10000000b003816043f0cdsi22820282pgc.706.2022.03.30.20.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:56:35 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=CGZDkgLH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F3B3E16C09B; Wed, 30 Mar 2022 20:08:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348451AbiC3P6s (ORCPT + 99 others); Wed, 30 Mar 2022 11:58:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348475AbiC3P6o (ORCPT ); Wed, 30 Mar 2022 11:58:44 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29A0D11152 for ; Wed, 30 Mar 2022 08:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=VDwf7xknVsKm4j6m+5m5/wje9BO0M2R51UqnrsEK8uY=; b=CGZDkgLHeNjoQXOlpycse36D2X TRbzQDZREozoG0/ENbdQtegSD3zbfShoGwwp9cdCxSFTf4yuuUq6j1drvezVsjikeRgY9Uuz3/aPU 9hyfJ5cYk1i2cLqS2YYZNkt67Xnos23QkCu0epA87QDTzDsHYhAw81EFkxiUdO6xmfjXU+qhd8FtJ 7CP/yfM+z9d7tNNWs+6NZlpNgQcYxCh3ugJJbm4jY/+qep5VX04p4LwB23aHepXzkQ+GU0Cy71k0B iYPSvz5AEreN4Hw0BBQGdsMYUNV8HmYaDWKV2qY8JdxZc9uf/YvwvKjNLzykvslb7A8zBW0rD9t3u ND2XtrnQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZagb-00GhUG-Ad; Wed, 30 Mar 2022 15:56:41 +0000 Date: Wed, 30 Mar 2022 08:56:41 -0700 From: Christoph Hellwig To: Jiasheng Jiang Cc: rpeterso@redhat.com, agruenba@redhat.com, cluster-devel@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [Cluster-devel] [PATCH] gfs2: Add check for mempool_alloc Message-ID: References: <20220311083616.2213689-1-jiasheng@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220311083616.2213689-1-jiasheng@iscas.ac.cn> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Fri, Mar 11, 2022 at 04:36:16PM +0800, Jiasheng Jiang wrote: > As the potential failure of mempool_alloc(), > it could return NULL pointer. > Therefore, it should be better to check it > in order to avoid the dereference of the NULL > pointer. > > Fixes: e8c92ed76900 ("GFS2: Clean up log write code path") > Signed-off-by: Jiasheng Jiang Please explain how it could fail to start with.