From: Jason Gunthorpe <jgg@ziepe.ca>
To: Anton Vasilyev <vasilyev@ispras.ru>
Cc: Selvin Xavier <selvin.xavier@broadcom.com>,
Devesh Sharma <devesh.sharma@broadcom.com>,
Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
Leon Romanovsky <leon@kernel.org>,
Michael Mera <dev@michaelmera.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
ldv-project@linuxtesting.org
Subject: Re: hw: Fix permissions for OCRDMA_RESET_STATS
Date: Wed, 20 Dec 2017 19:59:02 -0700 [thread overview]
Message-ID: <20171221025902.GA10170@ziepe.ca> (raw)
In-Reply-To: <1502207797-25589-1-git-send-email-vasilyev@ispras.ru>
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 <vasilyev@ispras.ru>
> Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
> 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
prev parent reply other threads:[~2017-12-21 3:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 15:56 [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS Anton Vasilyev
2017-08-15 18:31 ` Leon Romanovsky
2017-12-19 10:29 ` Selvin Xavier
2017-12-19 12:30 ` Leon Romanovsky
2017-12-19 17:44 ` Selvin Xavier
2017-12-21 5:05 ` Leon Romanovsky
2017-12-21 2:59 ` Jason Gunthorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171221025902.GA10170@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=dev@michaelmera.com \
--cc=devesh.sharma@broadcom.com \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=ldv-project@linuxtesting.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.com \
--cc=selvin.xavier@broadcom.com \
--cc=vasilyev@ispras.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox