diff options
author | Eryu Guan <eguan@redhat.com> | 2018-01-23 20:20:00 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-26 12:02:11 +0300 |
commit | f25ba4f6be4aa368a4ce22d225d4c09257b3667a (patch) | |
tree | 0bf6b46078fa769be4c16fe2ca582eaaa5b6b7a6 /sound | |
parent | a42ebbdae0a58e62906a47fc36b89822c82f627a (diff) | |
download | linux-f25ba4f6be4aa368a4ce22d225d4c09257b3667a.tar.xz |
blk-mq-debugfs: don't allow write on attributes with seq_operations set
[ Upstream commit 6b136a24b05c81a24e0b648a4bd938bcd0c4f69e ]
Attributes that only implement .seq_ops are read-only, any write to
them should be rejected. But currently kernel would crash when
writing to such debugfs entries, e.g.
chmod +w /sys/kernel/debug/block/<dev>/requeue_list
echo 0 > /sys/kernel/debug/block/<dev>/requeue_list
chmod -w /sys/kernel/debug/block/<dev>/requeue_list
Fix it by returning -EPERM in blk_mq_debugfs_write() when writing to
such attributes.
Cc: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions