Message ID | 20220228172251.204987715@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6B07C433EF for <stable@archiver.kernel.org>; Mon, 28 Feb 2022 17:35:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232743AbiB1Rgb (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 28 Feb 2022 12:36:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234072AbiB1RgE (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 28 Feb 2022 12:36:04 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7822595484; Mon, 28 Feb 2022 09:31:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 984DEB815BA; Mon, 28 Feb 2022 17:31:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1BCAC340F0; Mon, 28 Feb 2022 17:31:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646069492; bh=5OcLa9xhiQm5sSpWziM/BAipFWqf/w/nCCjsk6ZkN4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E7PXelrMot0ccOIhlx9wMAAR2eC3uE7ODQCEBZwNWr0rQJ+LiTV4ihZbzO7lNkf3P UEawjRm7xeEEvWzPf1e8EEuLcjStNnIx5sUTpjMbmQfdhuRDfv/+eKUpOSMTf2neJY u8y/u/psYejY/P1Vz7bq9qBLyQM2ZqJuyjHN7vqg= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>, "Steven Rostedt (Google)" <rostedt@goodmis.org> Subject: [PATCH 5.4 40/53] tracefs: Set the group ownership in apply_options() not parse_options() Date: Mon, 28 Feb 2022 18:24:38 +0100 Message-Id: <20220228172251.204987715@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228172248.232273337@linuxfoundation.org> References: <20220228172248.232273337@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -262,7 +262,6 @@ static int tracefs_parse_options(char *d if (!gid_valid(gid)) return -EINVAL; opts->gid = gid; - set_gid(tracefs_mount->mnt_root, gid); break; case Opt_mode: if (match_octal(&args[0], &option)) @@ -289,7 +288,9 @@ static int tracefs_apply_options(struct inode->i_mode |= opts->mode; inode->i_uid = opts->uid; - inode->i_gid = opts->gid; + + /* Set all the group ids to the mount option */ + set_gid(sb->s_root, opts->gid); return 0; }