Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2151686ybm; Thu, 23 May 2019 12:12:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzznfGW8v/i23L66Ar6+zj9QBHyi4Ac6I1jPG8NyZo4ldp9DJy53ED+BhUOmC/lW7aMeE1Z X-Received: by 2002:a17:902:2e83:: with SMTP id r3mr84387430plb.139.1558638761788; Thu, 23 May 2019 12:12:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558638761; cv=none; d=google.com; s=arc-20160816; b=HUTj1rxK62OPj7pFpFWhTg6pMSXGLyu3Zuh1yR+YajMpj+fv/B3GTLGNNYgEiey8aj nEBNCEw12qBth4/f6gue8hl1Y5pwDiUqxq0m1Z1V4EUej2woPGX8Hj/e/ooRoktbLmB6 s6z8F3OPxF4DolSuq4RT45trFPFatgubsgPVlZlqFjpZIQCkc+fbLr8XB+VGxTXhk48S y7R6YnwO02CtSEkgROuqT/yaNncbL/Fa8/GrdCliT5lFjzTJ3NqQzbwGi6Cy0Aj6ni3P Ux4AzDRIZhyFZ9sTjwqJmmhvkjJqfO22kbJt/wrlZBBT650fo+yCK38vM5FQZqOoQydg s4Iw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eRjyhvIyOsjqfKtLgmt2qiNushuRRdjxlKPjPt2lwsk=; b=BFhb9Yx7+ZOLpXl7VKJGLMh1GBCSfQUtDVJpxuW6l+uNT+zCGIxu+8PTTrX9sTO6IN LDerjwISIqPQHURAWsXx1akzdmkKsrBfzf2WmPuubV4rLcI3qIcs86o4SOwbBUotHGwQ b+JfDvAW2wakN25KmxNRHPo/dJeQ8KZ/IgCMAcUZ6dZKry5tc1WqOYtwuneeE31jEHV0 0BownkRuFtVs+6+Xk8mEHY3FBlBGW3T43bOKwUF1Mpxz+qWT4APdqtv0zVoXOowflFGg GtF97zEI1v3OYr8aPTY8hfWWWXlzeA7miyojd4RCtyXaSJ90Ut4SJS3walV4ggKYhAwf H7uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Gs1CpTqX; 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 h1si578421pgs.290.2019.05.23.12.12.26; Thu, 23 May 2019 12:12:41 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Gs1CpTqX; 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 S2387833AbfEWTK3 (ORCPT + 99 others); Thu, 23 May 2019 15:10:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:43766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387821AbfEWTK1 (ORCPT ); Thu, 23 May 2019 15:10:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 87DEB217D9; Thu, 23 May 2019 19:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558638627; bh=97IRIs3gLrfSnPdxUy1ZyEwZGxnbK110X/WNgklQPk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gs1CpTqXRMX1S4yZuGSQBHHoVi4tfgeyiti6V5+2/Jk4GmKvel3TQ+PrC522SxXIt m2PqoYyDc3DHhUlyINbCNRNm0b5yerdoHPmbz+8ctd8jZrYRq5/HvQa9N/MRHxiRdt T2HJiAIOFtGYp7Qc0tPpub/v109GUAtaMBdJosTg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Al Viro , Sasha Levin Subject: [PATCH 4.9 49/53] ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour Date: Thu, 23 May 2019 21:06:13 +0200 Message-Id: <20190523181718.718899106@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181710.981455400@linuxfoundation.org> References: <20190523181710.981455400@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 4e9036042fedaffcd868d7f7aa948756c48c637d ] To choose whether to pick the GID from the old (16bit) or new (32bit) field, we should check if the old gid field is set to 0xffff. Mainline checks the old *UID* field instead - cut'n'paste from the corresponding code in ufs_get_inode_uid(). Fixes: 252e211e90ce Signed-off-by: Al Viro Signed-off-by: Sasha Levin --- fs/ufs/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ufs/util.h b/fs/ufs/util.h index 398019fb14481..9c4fb1fc0822a 100644 --- a/fs/ufs/util.h +++ b/fs/ufs/util.h @@ -228,7 +228,7 @@ ufs_get_inode_gid(struct super_block *sb, struct ufs_inode *inode) case UFS_UID_44BSD: return fs32_to_cpu(sb, inode->ui_u3.ui_44.ui_gid); case UFS_UID_EFT: - if (inode->ui_u1.oldids.ui_suid == 0xFFFF) + if (inode->ui_u1.oldids.ui_sgid == 0xFFFF) return fs32_to_cpu(sb, inode->ui_u3.ui_sun.ui_gid); /* Fall through */ default: -- 2.20.1