public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS
@ 2017-08-08 15:56 Anton Vasilyev
  2017-08-15 18:31 ` Leon Romanovsky
  2017-12-21  2:59 ` Jason Gunthorpe
  0 siblings, 2 replies; 7+ messages in thread
From: Anton Vasilyev @ 2017-08-08 15:56 UTC (permalink / raw)
  To: Selvin Xavier
  Cc: Anton Vasilyev, Devesh Sharma, Doug Ledford, Sean Hefty,
	Hal Rosenstock, Leon Romanovsky, Michael Mera, linux-rdma,
	linux-kernel, ldv-project

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>
---
 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
--- a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
+++ 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;
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-12-21  5:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox