Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2098062pxy; Mon, 2 Aug 2021 19:36:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvfPHxSIMWwjaN9UZXEsbAI2eeSNxrOKuwj0A0Tmxu/u2o1Arm4cd1eJVyezNuNrQZgqaD X-Received: by 2002:a02:cb4d:: with SMTP id k13mr4369924jap.31.1627958186413; Mon, 02 Aug 2021 19:36:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627958186; cv=none; d=google.com; s=arc-20160816; b=pG1OeUFG/QxlFczd81J06YGH0EQ7OgRhW6pQyls/bEf9UnLPWD8/opewmU7svEYp6B Fj8mYZvgTnrvk5aX9h2FDIMm8RJ69B/tki3D3+j9CDmtzjy6vro9vmkehkt376pJyI6v HIJPDWlAlyt13r0QNFD6u+Lhk1Upt+0XiLml51kDkVdfWeTSmlKgkv/WAMfGgG2MR+Nj N06ZfpCRpdhrt1zgt1mIsWMG/1evRTB4V+IzhRjKQVrEor+8V7WZAED3msJxTCqK13xU I7zM9dD2JL/7J+qvuCftGw3Y7ov4t75Uhdxh0DkJ8714kuWiHsoTWPBfmoIFladWynLz VWIQ== 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; bh=KKYjHLwuPHhhoIeqsPiTd6ewsTBb29ktsyEqXWgTexw=; b=STuT/b2Lk/TDdUoDUdlC7zqTnytn5PA5teoTrRHLkBu4YOM8P5NK29Eio+w0at7gdu t2L2Z/1Q6NKZ9mgWywJleCoLyIxrBFlkABqgloWUFrXiT2SfLSD0CImF8Wu/eDgS4bU9 /yWl96u5xn8IOdw3HCjBUGhBmLiueFG2HqouUtLGduYOHaVQs1cFZ8P3CCeIKzNoQk6M /jnI1GKaEdcJ4hj5TFJmJotyk/NaLX0I3EFf+VwRPsehYvtAenkUw8fepbFRWnmcqqyf cAUGTVn4S1/vIcHnT1Zro7NUvxwQ4p8i4G/FY4s//U0z+yMrs9bvKXQgcjUPtb+y4r4i Mcfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si14618777ioh.102.2021.08.02.19.36.14; Mon, 02 Aug 2021 19:36:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233356AbhHCCgM (ORCPT + 99 others); Mon, 2 Aug 2021 22:36:12 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:47158 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233304AbhHCCgL (ORCPT ); Mon, 2 Aug 2021 22:36:11 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 1732ZsXg018900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 2 Aug 2021 22:35:54 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id DBD4F15C3DD2; Mon, 2 Aug 2021 22:35:53 -0400 (EDT) Date: Mon, 2 Aug 2021 22:35:53 -0400 From: "Theodore Ts'o" To: wuguanghao Cc: linux-ext4@vger.kernel.org, linfeilong@huawei.com, liuzhiqiang26@huawei.com Subject: Re: [PATCH v3 11/12] misc/lsattr: check whether path is NULL in lsattr_dir_proc() Message-ID: References: <20210728015648.284588-1-wuguanghao3@huawei.com> <20210728015648.284588-5-wuguanghao3@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210728015648.284588-5-wuguanghao3@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Jul 28, 2021 at 09:56:48AM +0800, wuguanghao wrote: > From: Zhiqiang Liu > > In lsattr_dir_proc(), if malloc() return NULL, it will cause > a segmentation fault problem. > > Signed-off-by: Zhiqiang Liu > Signed-off-by: Wu Guanghao Thanks, applied. Note that fputs() does not print a trailing newline (unlike puts()). So I fixed up the error message to include a newline character at the end. - Ted