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.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 29213C282DE for ; Thu, 23 May 2019 19:36:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0284C20879 for ; Thu, 23 May 2019 19:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558640200; bh=dmdkHKAlomDeyTm+9zna1RJf7joT+IgtoQOEjI8u2SU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QKh3pSZO1JX8CDwekVXejkpGbSJk9JvqfBJq1+EPIFt+g3zkgToPA+EiMo8PXqkkx Qcn+wYoYIHMOGyEQ0ROU+NHLnLduJcTF5tUi60GKo/Ka1Gh3lpzgM94WkfIf5c7Qtm iA5CfKKVVGfbXEohydrql61yCyuR4EwZQ/Ylc0C0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389939AbfEWTgi (ORCPT ); Thu, 23 May 2019 15:36:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:36924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389999AbfEWTZZ (ORCPT ); Thu, 23 May 2019 15:25:25 -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 1CD8120868; Thu, 23 May 2019 19:25:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558639524; bh=dmdkHKAlomDeyTm+9zna1RJf7joT+IgtoQOEjI8u2SU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d92dbSmkV8tcxNwH/SlaCK1w4O7ICWpooNPy6RAsMLL74WHlQT5SdAdgdW/VMzRI6 PlQqzguQnzXPKWaN0vp6prc21CymX6lLYS49SM4Ri+kR9cP/ZVa5Q6cO0FE5jk9wWi VIphtSkUXuo+WTkgJX93MGA3Ju6Fiwe4CvHUKo2Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Al Viro , Sasha Levin Subject: [PATCH 5.0 129/139] ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour Date: Thu, 23 May 2019 21:06:57 +0200 Message-Id: <20190523181736.001450846@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181720.120897565@linuxfoundation.org> References: <20190523181720.120897565@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 1fd3011ea6236..7fd4802222b8c 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