Skip to content
Commit be3b0753 authored by OGAWA Hirofumi's avatar OGAWA Hirofumi Committed by Jens Axboe
Browse files

[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: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
parent dbecf3ab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment