From patchwork Mon Jul 3 07:33:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Konstantin Komarov X-Patchwork-Id: 115206 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp352602vqx; Mon, 3 Jul 2023 00:52:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlFAq9nsu3XmnmM3aHCvKB/9ug18ZEskG7d6ZQYLB8mOLIfI8w/ViIFa9kxUHj0Yd6I4ui9a X-Received: by 2002:a17:902:c246:b0:1b8:5827:8763 with SMTP id 6-20020a170902c24600b001b858278763mr10042414plg.4.1688370727864; Mon, 03 Jul 2023 00:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688370727; cv=none; d=google.com; s=arc-20160816; b=lY2RDJwdhiVtYgHVCCdGKv1vVKMINs2KhTRqw0X5UvXAvshNvSby0MfncolvzT73ES vAmuLiHRTgxYx1Fhgutonv9C+fT79qPmosrBYJVyGiJFlRmdmaUDszXtqqGYuYQZ/rP3 R9AAL2gAa2FggMSB/CI7oEXR3kXUUKi/J/PzG7D9g4Mv1HN08C9RJv8SVk92u3xxQzOV 1u91YwzI7ySaaQG/LgY2wbYxB9frJnehCZhHs4LnJtwbFlLBcGN62S3g0IVYQQBvsNYr 0c59wSrUsESCetE8x5srd2WLDn3Gm8qHUi9bvb2eBhlQTT9KN9UYPrBrN/mgmoxFYpBq dJuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id :dkim-signature:dkim-signature; bh=vyFL1oZhfU5xO720PsZEshxb54c3khK1/6rIHMavdPI=; fh=dCl1979m4GsDuVyljECYBpTlFFFr3blS3VPaYqWE2YI=; b=jRtr/D6kaF+elPOJrjl1VVwikav51qbKOq4SKU7ug7gEqVo8PDJ2bGaSC1c28AoTcb JPTUzoVDSlsdPIUwARgoE4I/hjcsY4d5605r/M93G+bxIQU1R7bAd949/oGJfuamESSn y4Ue5OwjhxRuAJ7UeXa0g4unAayTKIkiwOt1lQF/B4+AAACcGhcxH3EQL3VsfzJ6fRA8 n6Ky9JyMkRth0XcAF2flBjkWdMLWhxVhRYORwJ+yLDomOPhhkS7Th4/7skGh8Gb6zyVy TWUn7xPxBq8+FUaRkbz/d2hz3uEpkcY+oV5Prhaw8eh0qPlZxSxIkPBtkjPqCO31McKp rs/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b="uOhK/kSS"; dkim=pass header.i=@paragon-software.com header.s=mail header.b=QM8izeal; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a170902ea0200b001b89cda5e12si841723plg.546.2023.07.03.00.51.55; Mon, 03 Jul 2023 00:52:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b="uOhK/kSS"; dkim=pass header.i=@paragon-software.com header.s=mail header.b=QM8izeal; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231145AbjGCHdx (ORCPT + 99 others); Mon, 3 Jul 2023 03:33:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231159AbjGCHdq (ORCPT ); Mon, 3 Jul 2023 03:33:46 -0400 Received: from relayaws-01.paragon-software.com (relayaws-01.paragon-software.com [35.157.23.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCB7DE52; Mon, 3 Jul 2023 00:33:45 -0700 (PDT) Received: from relayfre-01.paragon-software.com (unknown [172.30.72.12]) by relayaws-01.paragon-software.com (Postfix) with ESMTPS id 7288A1D2D; Mon, 3 Jul 2023 07:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1688369312; bh=vyFL1oZhfU5xO720PsZEshxb54c3khK1/6rIHMavdPI=; h=Date:To:CC:From:Subject; b=uOhK/kSSM6jkXirF69xA1s7lI7dreMO3txzGArfuqppEp4wtSSKADULERPejg29Bm QjmaEVbhj8CFldZIBrA0EpnM2JBZfc+Hyc5LNA8RcjbiPZeMYxCnt5wmNB0LSifyr0 5eFrTLYpXCTr4H/KE0SFl7Bnp3UN2AefFxVAxW1s= Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relayfre-01.paragon-software.com (Postfix) with ESMTPS id E6539439; Mon, 3 Jul 2023 07:33:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1688369623; bh=vyFL1oZhfU5xO720PsZEshxb54c3khK1/6rIHMavdPI=; h=Date:To:CC:From:Subject; b=QM8izealV0gY8ReiLgWMkj4fwLg19nsJU9F1M4IIJf/KJQwzKK5YVeAtdKtOHZirI L7pxwKyW/FDF2b4ror+a0Np/uF+VIlZMxpoxeFamamlpaQw5W6CMD6jgc0zPs2rx52 USb/HzLlpHam/MOz4K02x77DYYGN8/aVe8OG5r9g= Received: from [192.168.211.138] (192.168.211.138) 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.2375.7; Mon, 3 Jul 2023 10:33:43 +0300 Message-ID: <5ce7410b-3715-dabb-0135-139f86546337@paragon-software.com> Date: Mon, 3 Jul 2023 11:33:42 +0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: CC: Linux Kernel Mailing List , , From: Konstantin Komarov Subject: [PATCH] fs/ntfs3: Correct mode for label entry inside /proc/fs/ntfs3/ X-Originating-IP: [192.168.211.138] X-ClientProxiedBy: vdlg-exch-02.paragon-software.com (172.30.1.105) To vdlg-exch-02.paragon-software.com (172.30.1.105) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770385024310320443?= X-GMAIL-MSGID: =?utf-8?q?1770385024310320443?= Suggested-by: Dan Carpenter Signed-off-by: Konstantin Komarov ---  fs/ntfs3/super.c | 7 ++++---  1 file changed, 4 insertions(+), 3 deletions(-)      } diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index e36769eac7de..1a02072b6b0e 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -1548,11 +1548,12 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)      /* Create /proc/fs/ntfs3/.. */      if (proc_info_root) {          struct proc_dir_entry *e = proc_mkdir(sb->s_id, proc_info_root); +        static_assert((S_IRUGO | S_IWUSR) == 0644);          if (e) { -            proc_create_data("volinfo", S_IFREG | S_IRUGO, e, +            proc_create_data("volinfo", S_IRUGO, e,                       &ntfs3_volinfo_fops, sb); -            proc_create_data("label", S_IFREG | S_IRUGO | S_IWUGO, -                     e, &ntfs3_label_fops, sb); +            proc_create_data("label", S_IRUGO | S_IWUSR, e, +                     &ntfs3_label_fops, sb);              sbi->procdir = e;          }