Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757639AbdLUDAi (ORCPT ); Wed, 20 Dec 2017 22:00:38 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:40818 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756374AbdLUDAe (ORCPT ); Wed, 20 Dec 2017 22:00:34 -0500 X-Google-Smtp-Source: ACJfBotQ4X0H7Lpsm1yFgX3tlcYH2arQTsFEqXkFrMKY+scIG0f12jslhHjzqGQ9J8/Tt6SmbqE7HQ== Date: Wed, 20 Dec 2017 19:59:02 -0700 From: Jason Gunthorpe To: Anton Vasilyev Cc: Selvin Xavier , Devesh Sharma , Doug Ledford , Sean Hefty , Hal Rosenstock , Leon Romanovsky , Michael Mera , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: Re: hw: Fix permissions for OCRDMA_RESET_STATS Message-ID: <20171221025902.GA10170@ziepe.ca> References: <1502207797-25589-1-git-send-email-vasilyev@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1502207797-25589-1-git-send-email-vasilyev@ispras.ru> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1295 Lines: 33 On Tue, Aug 08, 2017 at 06:56:37PM +0300, Anton Vasilyev wrote: > Debugfs file reset_stats is created with S_IRUSR permissions, > but ocrdma_dbgfs_ops_read() doesn't support OCRDMA_RESET_STATS, > whereas ocrdma_dbgfs_ops_write() supports only OCRDMA_RESET_STATS. > > The patch fixes misstype with permissions. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Anton Vasilyev > Acked-by: Selvin Xavier > drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c > index 66056f9..d42c617 100644 > +++ b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c > @@ -834,7 +834,7 @@ void ocrdma_add_port_stats(struct ocrdma_dev *dev) > > dev->reset_stats.type = OCRDMA_RESET_STATS; > dev->reset_stats.dev = dev; > - if (!debugfs_create_file("reset_stats", S_IRUSR, dev->dir, > + if (!debugfs_create_file("reset_stats", S_IWUSR, dev->dir, > &dev->reset_stats, &ocrdma_dbg_ops)) > goto err; > I changed the S_IWUSR to 0200 to make checkpatch happy, slowly we are trying to move to the standard style throughout, but applied to for-next now. Thanks, Jason