Commits
Vasily Tarasov authored and Pavel Emelianov committed 686c66c5382
[IOPRIO] Fix cfqq index calculation in async case Field ioprio of task_struct consits of two numbers: 1) value of class (bits 14-16), 2) value of data (bits 0-13). Value of data is allowed to belong the range [0, 7]. In current implementation of cfq_set_request tsk->ioprio is used as index of *async_cfqq[8] array. It is wrong because tsk->ioprio can be >> 8. This can cause to either corruption or reading insufficient value: cfq_set_request: .... if (!cfq_bc->async_cfqq[tsk->ioprio]) { cfqq = cfq_get_queue(cfqd, key, tsk, gfp_mask); if (!cfqq) goto queue_fail; cfq_bc->async_cfqq[tsk->ioprio] = cfqq; <<<corruption } else cfqq = cfq_bc->async_cfqq[tsk->ioprio]; <<<wrong value .... Correct index should be calculated from tsk->ioprio by using corresponding functions and macros. Patch contains necessary updates. probably fixes http://bugzilla.openvz.org/show_bug.cgi?id=496