From patchwork Wed Nov 27 11:52:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mkrtchyan, Tigran" X-Patchwork-Id: 3247511 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BBE90C045B for ; Wed, 27 Nov 2013 11:58:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0FE1205BB for ; Wed, 27 Nov 2013 11:58:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7867205BA for ; Wed, 27 Nov 2013 11:58:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754707Ab3K0L6g (ORCPT ); Wed, 27 Nov 2013 06:58:36 -0500 Received: from smtp-o-3.desy.de ([131.169.56.156]:40112 "EHLO smtp-o-3.desy.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752983Ab3K0L6f (ORCPT ); Wed, 27 Nov 2013 06:58:35 -0500 X-Greylist: delayed 375 seconds by postgrey-1.27 at vger.kernel.org; Wed, 27 Nov 2013 06:58:35 EST Received: from smtp-map-3.desy.de (smtp-map-3.desy.de [131.169.56.68]) by smtp-o-3.desy.de (DESY-O-3) with ESMTP id A16CC2802C4 for ; Wed, 27 Nov 2013 12:52:19 +0100 (CET) Received: from ZITSWEEP2.win.desy.de (zitsweep2.win.desy.de [131.169.97.96]) by smtp-map-3.desy.de (DESY_MAP_3) with ESMTP id 835B012AB for ; Wed, 27 Nov 2013 12:52:18 +0100 (MET) Received: from smtp-intra-3.desy.de (lb-40-26.desy.de) by ZITSWEEP2.win.desy.de (Clearswift SMTPRS 5.5.0) with ESMTP id for ; Wed, 27 Nov 2013 12:52:19 +0100 Received: from anahit.desy.de (anahit.desy.de [131.169.185.68]) by smtp-intra-3.desy.de (DESY-INTRA-3) with ESMTP id 9597312AB; Wed, 27 Nov 2013 12:52:18 +0100 (MET) From: Tigran Mkrtchyan To: linux-nfs@vger.kernel.org Cc: Tigran Mkrtchyan Subject: [PATCH] proc: change permission of /proc/self/mountstats to 0644 Date: Wed, 27 Nov 2013 12:52:15 +0100 Message-Id: <1385553135-23131-1-git-send-email-tigran.mkrtchyan@desy.de> X-Mailer: git-send-email 1.8.4.2 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,HK_RANDOM_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While working on a ganglia plugin for NFS I run into problem that /proc/self/mountstats is readable by process owner only. As ganglia changes collector threads effective uid, it can't access to mountstats file any more. The content of mountstats is equal for all processes and can be safely shared. Signed-off-by: Tigran Mkrtchyan --- fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 03c8d74..d41e284 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2607,7 +2607,7 @@ static const struct pid_entry tgid_base_stuff[] = { LNK("exe", proc_exe_link), REG("mounts", S_IRUGO, proc_mounts_operations), REG("mountinfo", S_IRUGO, proc_mountinfo_operations), - REG("mountstats", S_IRUSR, proc_mountstats_operations), + REG("mountstats", S_IRUGO, proc_mountstats_operations), #ifdef CONFIG_PROC_PAGE_MONITOR REG("clear_refs", S_IWUSR, proc_clear_refs_operations), REG("smaps", S_IRUGO, proc_pid_smaps_operations),