aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2011-11-23 04:59:13 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-06 17:13:48 -0500
commitd27bf91d1a9ea58a32bf9dd949e93bb1dc1fc9bf (patch)
tree3b71c18560ce6e675525c0d0899f542fabaa72a4 /include/linux
parentafa2450ce311b3182c737c3fda59bb557da93409 (diff)
block: initialize request_queue's numa node during
commit 5151412dd4338b273afdb107c3772528e9e67d92 upstream. struct request_queue is allocated with __GFP_ZERO so its "node" field is zero before initialization. This causes an oops if node 0 is offline in the page allocator because its zonelists are not initialized. From Dave Young's dmesg: SRAT: Node 1 PXM 2 0-d0000000 SRAT: Node 1 PXM 2 100000000-330000000 SRAT: Node 0 PXM 1 330000000-630000000 Initmem setup node 1 0000000000000000-000000000affb000 ... Built 1 zonelists in Node order, mobility grouping on. ... BUG: unable to handle kernel paging request at 0000000000001c08 IP: [<ffffffff8111c355>] __alloc_pages_nodemask+0xb5/0x870 and __alloc_pages_nodemask+0xb5 translates to a NULL pointer on zonelist->_zonerefs. The fix is to initialize q->node at the time of allocation so the correct node is passed to the slab allocator later. Since blk_init_allocated_queue_node() is no longer needed, merge it with blk_init_allocated_queue(). [rientjes@google.com: changelog, initializing q->node] Reported-by: Dave Young <dyoung@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: David Rientjes <rientjes@google.com> Tested-by: Dave Young <dyoung@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 1a23722e887..cd93f9994ad 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -798,9 +798,6 @@ extern void blk_unprep_request(struct request *);
798 */ 798 */
799extern struct request_queue *blk_init_queue_node(request_fn_proc *rfn, 799extern struct request_queue *blk_init_queue_node(request_fn_proc *rfn,
800 spinlock_t *lock, int node_id); 800 spinlock_t *lock, int node_id);
801extern struct request_queue *blk_init_allocated_queue_node(struct request_queue *,
802 request_fn_proc *,
803 spinlock_t *, int node_id);
804extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *); 801extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *);
805extern struct request_queue *blk_init_allocated_queue(struct request_queue *, 802extern struct request_queue *blk_init_allocated_queue(struct request_queue *,
806 request_fn_proc *, spinlock_t *); 803 request_fn_proc *, spinlock_t *);