From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEED1C04AAF for ; Thu, 16 May 2019 11:44:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BFD5120833 for ; Thu, 16 May 2019 11:44:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558007050; bh=TUQU0ao3WYeoFy+YytAi8+uhzS+S6UFxSVk7Y+p8ViY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=k8icO+OcZUupV752uHTruY3MwudmGoobu9JDCLdvMH207Te+KVtQROj2f/uBv1aVG VGHSHF23Cply6nWKY42kNahEW7h6mlnjJ7D9C4JzZlewdKUQCm1HujfD75kjN6eKT7 NYwoEc+Q4L9xNmHgiOXY4LekQTQpaYaGBp3kkJC8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728193AbfEPLlc (ORCPT ); Thu, 16 May 2019 07:41:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:50270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727496AbfEPLlb (ORCPT ); Thu, 16 May 2019 07:41:31 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6592B21726; Thu, 16 May 2019 11:41:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558006890; bh=TUQU0ao3WYeoFy+YytAi8+uhzS+S6UFxSVk7Y+p8ViY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b9U2cWPltY9LXQ6lYvmW+WrjBALBb2Kktg3UfCSMwHDrevAxJbh89goyloGe8VkzU fLVyBvrBJoHhqloPNpgZ2sv+fTsbapNIX2nsj5MmqjaNfv1ogOkCMVN61O+7GHCoDb Dh0cV6bYhAl8kmxevq2AAU8ltIiFU1khyelDJrbI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Al Viro , Sasha Levin Subject: [PATCH AUTOSEL 4.14 15/16] ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour Date: Thu, 16 May 2019 07:41:06 -0400 Message-Id: <20190516114107.8963-15-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190516114107.8963-1-sashal@kernel.org> References: <20190516114107.8963-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Al Viro [ 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 1907be6d58085..f3092d513551a 100644 --- a/fs/ufs/util.h +++ b/fs/ufs/util.h @@ -229,7 +229,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