Re: [PATCH] Rename tsk_restore_flags() to current_restore_flags()

2017-04-07 Thread Michal Hocko
On Fri 07-04-17 10:03:26, NeilBrown wrote: > > It is not safe for one thread to modify the ->flags > of another thread as there is no locking that can protect > the update. > So tsk_restore_flags(), which takes a task pointer and modifies > the flags, is an invitation to do the wrong thing. > >

Re: [PATCH] Rename tsk_restore_flags() to current_restore_flags()

2017-04-07 Thread Michal Hocko
On Fri 07-04-17 10:03:26, NeilBrown wrote: > > It is not safe for one thread to modify the ->flags > of another thread as there is no locking that can protect > the update. > So tsk_restore_flags(), which takes a task pointer and modifies > the flags, is an invitation to do the wrong thing. > >

[PATCH] Rename tsk_restore_flags() to current_restore_flags()

2017-04-06 Thread NeilBrown
It is not safe for one thread to modify the ->flags of another thread as there is no locking that can protect the update. So tsk_restore_flags(), which takes a task pointer and modifies the flags, is an invitation to do the wrong thing. All current users pass "current" as the task, so no

[PATCH] Rename tsk_restore_flags() to current_restore_flags()

2017-04-06 Thread NeilBrown
It is not safe for one thread to modify the ->flags of another thread as there is no locking that can protect the update. So tsk_restore_flags(), which takes a task pointer and modifies the flags, is an invitation to do the wrong thing. All current users pass "current" as the task, so no