Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1706708
| From | Anton Vasilyev <vasilyev@ispras.ru> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] hw: Fix permissions for OCRDMA_RESET_STATS |
| Date | 2017-08-08 18:00 +0200 |
| Message-ID | <ucf5i-258-61@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] hw: Fix permissions for OCRDMA_RESET_STATS Anton Vasilyev <vasilyev@ispras.ru> - 2017-08-08 18:00 +0200
csiph-web