From: Nikanth Karthikesan Date: Mon, 27 Apr 2009 12:53:54 +0000 (+0200) Subject: block: catch trying to use more bits than request->cmd_flags has X-Git-Tag: v2.6.31-rc1~389^2~106 X-Git-Url: http://ftp.safe.ca/?a=commitdiff_plain;h=9eb55b030c4b3227334ee4482402096cd1d1a6fe;p=safe%2Fjmp%2Flinux-2.6 block: catch trying to use more bits than request->cmd_flags has Signed-off-by: Nikanth Karthikesan Signed-off-by: Jens Axboe --- diff --git a/block/blk-core.c b/block/blk-core.c index 1e3b97f..394c5bd 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2097,6 +2097,9 @@ EXPORT_SYMBOL(kblockd_schedule_work); int __init blk_dev_init(void) { + BUILD_BUG_ON(__REQ_NR_BITS > 8 * + sizeof(((struct request *)0)->cmd_flags)); + kblockd_workqueue = create_workqueue("kblockd"); if (!kblockd_workqueue) panic("Failed to create kblockd\n");