summaryrefslogtreecommitdiffstats
path: root/block/bsg.c
diff options
context:
space:
mode:
authorEryu Guan <eguan@redhat.com>2018-01-23 18:20:00 +0100
committerJens Axboe <axboe@kernel.dk>2018-01-24 17:46:09 +0100
commit6b136a24b05c81a24e0b648a4bd938bcd0c4f69e (patch)
treeefa76cb522a4a75c2970b6ec0a59aa64ba391706 /block/bsg.c
parentblock: Set BIO_TRACE_COMPLETION on new bio during split (diff)
downloadlinux-6b136a24b05c81a24e0b648a4bd938bcd0c4f69e.tar.xz
linux-6b136a24b05c81a24e0b648a4bd938bcd0c4f69e.zip
blk-mq-debugfs: don't allow write on attributes with seq_operations set
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>
Diffstat (limited to 'block/bsg.c')
0 files changed, 0 insertions, 0 deletions