]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix oops on !disk->queue and sysfs discard alignment display
authorJens Axboe <jaxboe@fusionio.com>
Thu, 26 May 2011 19:01:38 +0000 (21:01 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 26 May 2011 19:01:38 +0000 (21:01 +0200)
commit4d9866831f2dea8565d0b0152c51f1712812b706
tree7c16496c0f87bc4f1236c08e264065c776baec73
parentf893136d2a6f5c193ff7d6da30e02c429bc4f7da
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 b79f3800769c962bf3 (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 <eric.dumazet@gmail.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
fs/partitions/check.c