From: Zachary Amsden Date: Wed, 9 Nov 2005 12:23:01 +0000 (+0100) Subject: [BLOCK] elevator init fixes X-Git-Tag: v2.6.15-rc2~232 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8ea2cb5120a92fe63053a2896be42abbb919a76;p=pandora-kernel.git [BLOCK] elevator init fixes I got a panic in the elevator code, backtrace : Unable to handle kernel NULL pointer dereference at virtual address 00000060 .. EIP is at elevator_put+0x0/0x30 (null elevator_type passed) .. elevator_init+0x38 blk_init_queu_node+0xc9 floppy_init+0xdb do_initcalls+0x23 init+0x10a init+0x0 Clearly if the kmalloc here fails, e->elevator_type is not yet set; this appears to be the correct fix, but I think I probably hit the second case due to a race condition. Someone more familiar with the elevator code should look at this more closely until I can determine if I can reproduce. Signed-off-by: Zachary Amsden Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe --- Reading git-diff-tree failed