This is a note to let you know that I've just added the patch titled blk-mq: use 'nr_cpu_ids' as highest CPU ID count for hwq <-> cpu map to the 3.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: blk-mq-use-nr_cpu_ids-as-highest-cpu-id-count-for-hwq-cpu-map.patch and it can be found in the queue-3.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From a33c1ba2913802b6fb23e974bb2f6a4e73c8b7ce Mon Sep 17 00:00:00 2001 From: Jens Axboe <axboe@xxxxxx> Date: Mon, 24 Nov 2014 15:02:42 -0700 Subject: blk-mq: use 'nr_cpu_ids' as highest CPU ID count for hwq <-> cpu map From: Jens Axboe <axboe@xxxxxx> commit a33c1ba2913802b6fb23e974bb2f6a4e73c8b7ce upstream. We currently use num_possible_cpus(), but that breaks on sparc64 where the CPU ID space is discontig. Use nr_cpu_ids as the highest CPU ID instead, so we don't end up reading from invalid memory. Signed-off-by: Jens Axboe <axboe@xxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- block/blk-mq-cpumap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/block/blk-mq-cpumap.c +++ b/block/blk-mq-cpumap.c @@ -90,7 +90,7 @@ unsigned int *blk_mq_make_queue_map(stru unsigned int *map; /* If cpus are offline, map them to first hctx */ - map = kzalloc_node(sizeof(*map) * num_possible_cpus(), GFP_KERNEL, + map = kzalloc_node(sizeof(*map) * nr_cpu_ids, GFP_KERNEL, set->numa_node); if (!map) return NULL; Patches currently in stable-queue which might be from axboe@xxxxxx are queue-3.18/blk-mq-use-nr_cpu_ids-as-highest-cpu-id-count-for-hwq-cpu-map.patch queue-3.18/blk-mq-fix-uninitialized-kobject-at-cpu-hotplugging.patch queue-3.18/blk-mq-fix-a-use-after-free.patch queue-3.18/blk-mq-avoid-that-__bt_get_word-wraps-multiple-times.patch queue-3.18/blk-mq-fix-a-race-between-bt_clear_tag-and-bt_get.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html