mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
RDMA/ocrdma: Fix permissions for OCRDMA_RESET_STATS
[ Upstream commit 7448208691 ]
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>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7b7e076f8c
commit
e434a6eaed
@@ -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", 0200, dev->dir,
|
||||
&dev->reset_stats, &ocrdma_dbg_ops))
|
||||
goto err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user