summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2015-08-09 03:41:50 -0400
committerLuis Henriques <luis.henriques@canonical.com>2015-09-28 10:21:41 +0100
commit3cb19874fbe77035840e9c22f433ea5c41507018 (patch)
treeceaea4df7b2861b2c590d2387c7bea1d20928298 /arch
parent05e638ae310a451dbb5be0dfbf352bbfd88464fb (diff)
downloadlinux-stable-3cb19874fbe77035840e9c22f433ea5c41507018.tar.gz
linux-stable-3cb19874fbe77035840e9c22f433ea5c41507018.tar.bz2
linux-stable-3cb19874fbe77035840e9c22f433ea5c41507018.zip
blk-mq: fix buffer overflow when reading sysfs file of 'pending'
commit 596f5aad2a704b72934e5abec1b1b4114c16f45b upstream. There may be lots of pending requests so that the buffer of PAGE_SIZE can't hold them at all. One typical example is scsi-mq, the queue depth(.can_queue) of scsi_host and blk-mq is quite big but scsi_device's queue_depth is a bit small(.cmd_per_lun), then it is quite easy to have lots of pending requests in hw queue. This patch fixes the following warning and the related memory destruction. [ 359.025101] fill_read_buffer: blk_mq_hw_sysfs_show+0x0/0x7d returned bad count^M [ 359.055595] irq event stamp: 15537^M [ 359.055606] general protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC ^M [ 359.055614] Dumping ftrace buffer:^M [ 359.055660] (ftrace buffer empty)^M [ 359.055672] Modules linked in: nbd ipv6 kvm_intel kvm serio_raw^M [ 359.055678] CPU: 4 PID: 21631 Comm: stress-ng-sysfs Not tainted 4.2.0-rc5-next-20150805 #434^M [ 359.055679] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011^M [ 359.055682] task: ffff8802161cc000 ti: ffff88021b4a8000 task.ti: ffff88021b4a8000^M [ 359.055693] RIP: 0010:[<ffffffff811541c5>] [<ffffffff811541c5>] __kmalloc+0xe8/0x152^M Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Jens Axboe <axboe@fb.com> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions