android_kernel_samsung_a7y1.../block
Ming Lei 7d12954e44 blk-mq: avoid sysfs buffer overflow with too many CPU cores
commit 8962842ca5abdcf98e22ab3b2b45a103f0408b95 upstream.

It is reported that sysfs buffer overflow can be triggered if the system
has too many CPU cores(>841 on 4K PAGE_SIZE) when showing CPUs of
hctx via /sys/block/$DEV/mq/$N/cpu_list.

Use snprintf to avoid the potential buffer overflow.

This version doesn't change the attribute format, and simply stops
showing CPU numbers if the buffer is going to overflow.

Cc: stable@vger.kernel.org
Fixes: 676141e48af7("blk-mq: don't dump CPU -> hw queue map on driver load")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 13:07:09 +02:00
..
partitions A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bio-integrity.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bio.c block: do not leak memory in bio_copy_user_iov() 2020-04-06 15:08:22 +02:00
blk-cgroup.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-core.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-exec.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-flush.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-integrity.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-ioc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-iopoll.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-lib.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-map.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-merge.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-mq-cpu.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-mq-cpumap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-mq-sysfs.c blk-mq: avoid sysfs buffer overflow with too many CPU cores 2020-04-07 13:07:09 +02:00
blk-mq-tag.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-mq-tag.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-mq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-mq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-settings.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-softirq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-sysfs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-tag.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-throttle.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk-timeout.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blk.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bounce.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bsg-lib.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bsg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cfq-iosched.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cmdline-parser.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
compat_ioctl.c take floppy compat ioctls to sodding floppy.c 2020-04-06 20:04:33 +02:00
deadline-iosched.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
elevator.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
genhd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ioctl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ioprio.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.iosched A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
noop-iosched.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
partition-generic.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
scsi_ioctl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
t10-pi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30