On (11/08/10 12:24), Paul E. McKenney wrote: > Looking over the patch again, the scope of the RCU read-side critical > section needs to expand to cover the use of the pointer as well as the > call to find_task_by_vpid(). So, for example: > > case IOPRIO_WHO_PROCESS: > rcu_read_lock(); > if (!who) > p = current; > else > p = find_task_by_vpid(who); > if (p) > ret = set_task_ioprio(p, ioprio); > rcu_read_unlock(); > break; > case IOPRIO_WHO_PGRP: > > > Otherwise, the task could go away before the last use. > > Sergey, could you please make this change and re-post your patch? > > Thanx, Paul > Hello, Should we protect set_task_ioprio? Critical operations are protected with rcu_read_lock/rcu_read_unlock in set_task_ioprio, the rest is protected via task_lock(task)/task_unlock(task). Sergey