[lkml]   [2012]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [tip:sched/core] sched: Fix ancient race in do_exit()
On Sat, Jan 28, 2012 at 4:03 AM, tip-bot for Yasunori Goto
<> wrote:
> sched: Fix ancient race in do_exit()


It would be much nicer to just clear the rwsem waiter->task thing
*after* waking the task up, which would avoid this race entirely,

Tell me, why wouldn't that work? rwsem_down_failed_common() does

/* wait to be given the lock */
for (;;) {
if (!waiter.task)

so then we wouldn't need the task refcount crap in rwsem either etc,
and we'd get rid of all races with wakeup.

I wonder why we're clearing that whole waiter->task so early.


 \ /
  Last update: 2012-01-28 22:15    [W:0.137 / U:10.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site