From: Jens Axboe Date: Thu, 26 May 2011 19:01:38 +0000 (+0200) Subject: block: fix oops on !disk->queue and sysfs discard alignment display X-Git-Tag: v3.0-rc1~42^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4fa3424c66255ba1e07b26becfc3d6cab0fdf65;p=pandora-kernel.git block: fix oops on !disk->queue and sysfs discard alignment display Eric Dumazet reports: ---- At boot, I have a crash in part_discard_alignment_show+0x1b/0x50 CR2 : 000006ac fault in : mov 0x2c(%rcx),%edx I suspect commit 23ceb5b7719e9276d4 (block: Remove extra discard_alignment from hd_struct) being in fault ---- Not quite known how ->queue can be NULL while the sysfs entry exists, but lets play it safe and check for a NULL queue. The rest of the sysfs show strategies in check.c do not dereference disk->queue. Reported-by: Eric Dumazet Signed-off-by: Jens Axboe --- Reading git-diff-tree failed