Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1508104pxb; Fri, 27 Aug 2021 10:22:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziYk6nbiTgF3xwUEe0EEmUJJsDt8UE5vzlU8q4B1AJq6kZSKeKvpfkHc9KCYjcz7Da9YNO X-Received: by 2002:a17:906:31cf:: with SMTP id f15mr11373520ejf.272.1630084928499; Fri, 27 Aug 2021 10:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630084928; cv=none; d=google.com; s=arc-20160816; b=l6FVNieEBS/fsv4Dps8ULNGFDT80nwgyWjJo1S0xSqJOsKmmRPpxSpYyzCsZaHte7r ni2r1noZOh0ZFPamxyowCKfYqUXIvSj6oGjcbFEnRp9Ghmy03BT+lqG4DpfOsUhgs+wT +KlU7lMOWUormgcBNaqq0KNcNhCProb2Uzj9ytRDpt3x/Ye4aSKxR9GHx79bsujpPkHb /ayaTJA6X/6Kp5PWeH8lp4K4FpmZ21mVrUhkdbLGF4SN5jPaMx1fvasbLLWQJxVmGh/2 FlPraEfekoEj94wm+m8UYeIBzSKSVAeLIL+oQPrqcaRTTK1r4XAz4Tz8jxRxvcC50fdm N4yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=5Nw7v9NTMS8258UFCfYCXGLMQoTyuQKiZqWPaggUcRg=; b=ZmUFZBm68tOHw2HjTAVzoSZItRmjMC/LJpiGOhcoNSCMy/U3RjiLlMo9qlOFnRJ5JU 4MUJ4NaRJURWKuGSiVf81d6bFRvFuFJu1qaXV+w3CzKTYlk/mtaab+ODtF/ZV8HS4Dfp 0/TCw19Qf033BKHIxqfu/c5djBAnKKbzMLpqd1wCo+mVCZC9VZ4x/WAjVSMSboqtzam8 /OYfo23ARQYN/3bnukW2CPWhfeEuP3H74MKFKJl/2gHvY5sKxwBEe9Y15jHQQlViutpm //PQy49nQcavCDoPQYhXLaZJI/hPYe5RHdYlAMWYY1E47BSiQfVCrJRt5325QRpCyIui bo+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=pdVACW35; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w18si6907809ejv.669.2021.08.27.10.21.44; Fri, 27 Aug 2021 10:22:08 -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=@paragon-software.com header.s=mail header.b=pdVACW35; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240543AbhH0RSu (ORCPT + 99 others); Fri, 27 Aug 2021 13:18:50 -0400 Received: from relaydlg-01.paragon-software.com ([81.5.88.159]:60421 "EHLO relaydlg-01.paragon-software.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240482AbhH0RSp (ORCPT ); Fri, 27 Aug 2021 13:18:45 -0400 Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relaydlg-01.paragon-software.com (Postfix) with ESMTPS id 1115082098; Fri, 27 Aug 2021 20:17:55 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1630084675; bh=5Nw7v9NTMS8258UFCfYCXGLMQoTyuQKiZqWPaggUcRg=; h=From:To:CC:Subject:Date:References:In-Reply-To; b=pdVACW35hyhaFzg3zWisQOuPMSYYs1UIjG96vGDuqJqVxdnqb543ANHeTHaE5Oil3 P+gkXxKGL59DG69Of1wKoTNWHY2DiaBaOPEQ294l5Q7uIaTd//1Ranf2Oqy5nT8EZ0 pQiEeh/LOv7IYFHZbAWhk3MoHf8ZRHp7UtXfUhLc= Received: from vdlg-exch-02.paragon-software.com (172.30.1.105) by vdlg-exch-02.paragon-software.com (172.30.1.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 27 Aug 2021 20:17:54 +0300 Received: from vdlg-exch-02.paragon-software.com ([fe80::586:6d72:3fe5:bd9b]) by vdlg-exch-02.paragon-software.com ([fe80::586:6d72:3fe5:bd9b%12]) with mapi id 15.01.2176.009; Fri, 27 Aug 2021 20:17:54 +0300 From: Konstantin Komarov To: Dan Carpenter , Kari Argillander CC: "ntfs3@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "kernel-janitors@vger.kernel.org" Subject: RE: [PATCH] fs/ntfs3: fix an error code in ntfs_get_acl_ex() Thread-Topic: [PATCH] fs/ntfs3: fix an error code in ntfs_get_acl_ex() Thread-Index: AQHXmN4THTu3LgVVhE6dhDj9H1dO4KuCqQOAgAAH9QCABOwqsA== Date: Fri, 27 Aug 2021 17:17:54 +0000 Message-ID: References: <20210824114858.GH31143@kili> <20210824163851.hfbjqqpztgk4ngd5@kari-VirtualBox> <20210824170720.GO7722@kadam> In-Reply-To: <20210824170720.GO7722@kadam> Accept-Language: ru-RU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.0.26] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Dan Carpenter > Sent: Tuesday, August 24, 2021 8:07 PM > To: Kari Argillander > Cc: Konstantin Komarov ; ntfs3@= lists.linux.dev; linux-kernel@vger.kernel.org; kernel- > janitors@vger.kernel.org > Subject: Re: [PATCH] fs/ntfs3: fix an error code in ntfs_get_acl_ex() >=20 > On Tue, Aug 24, 2021 at 07:38:51PM +0300, Kari Argillander wrote: > > On Tue, Aug 24, 2021 at 02:48:58PM +0300, Dan Carpenter wrote: > > > diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c > > > index 9239c388050e..e8ed38d0c4c9 100644 > > > --- a/fs/ntfs3/xattr.c > > > +++ b/fs/ntfs3/xattr.c > > > @@ -521,7 +521,7 @@ static struct posix_acl *ntfs_get_acl_ex(struct u= ser_namespace *mnt_userns, > > > ni_unlock(ni); > > > > > > /* Translate extended attribute to acl */ > > > - if (err > 0) { > > > + if (err >=3D 0) { > > > > So now if err (size) is 0 it will try to get acl. Didn't you just say > > that you want to return PTR_ERR(-EINVAL)? > > >=20 > If you pass an invalid too short size to posix_acl_from_xattr() then it > returns PTR_ERR(-EINVAL). It was hard to phrase this in the change log > but I feel like length of 1 and 0 should be treated the same. >=20 >=20 > > So overall good finding but maybe more work is needed with this one. > > > > > acl =3D posix_acl_from_xattr(mnt_userns, buf, err); > > > if (!IS_ERR(acl)) > > > set_cached_acl(inode, type, acl); >=20 > regards, > dan carpenter >=20 Applied, thanks!