Commit 74482086 authored by Anton Vasilyev's avatar Anton Vasilyev Committed by Jason Gunthorpe

RDMA/ocrdma: Fix permissions for OCRDMA_RESET_STATS

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: default avatarAnton Vasilyev <vasilyev@ispras.ru>
Acked-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 66f53e6f
...@@ -834,7 +834,7 @@ void ocrdma_add_port_stats(struct ocrdma_dev *dev) ...@@ -834,7 +834,7 @@ void ocrdma_add_port_stats(struct ocrdma_dev *dev)
dev->reset_stats.type = OCRDMA_RESET_STATS; dev->reset_stats.type = OCRDMA_RESET_STATS;
dev->reset_stats.dev = dev; dev->reset_stats.dev = dev;
if (!debugfs_create_file("reset_stats", S_IRUSR, dev->dir, if (!debugfs_create_file("reset_stats", 0200, dev->dir,
&dev->reset_stats, &ocrdma_dbg_ops)) &dev->reset_stats, &ocrdma_dbg_ops))
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment