]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] cfq: Further rbtree traversal and cfq_exit_queue() race fix
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Tue, 18 Apr 2006 17:18:31 +0000 (19:18 +0200)
committerJens Axboe <axboe@suse.de>
Tue, 18 Apr 2006 17:18:31 +0000 (19:18 +0200)
commitbe3b075354e170368a0d29558cae492205e80a64
treeb37af91addb8d214b9010774f5cf31538a501267
parentdbecf3ab40b5a6cc4499543778cd9f9682c0abad
[PATCH] cfq: Further rbtree traversal and cfq_exit_queue() race fix

In current code, we are re-reading cic->key after dead cic->key check.
So, in theory, it may really re-read *after* cfq_exit_queue() seted NULL.

To avoid race, we copy it to stack, then use it. With this change, I
guess gcc will assign cic->key to a register or stack, and it wouldn't
be re-readed.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Jens Axboe <axboe@suse.de>
block/cfq-iosched.c