Re: [PATCH] task_work: add a scheduling point in task_work_run()

From: Eric Dumazet
Date: Tue Aug 21 2012 - 17:32:07 EST


On Tue, 2012-08-21 at 16:37 -0400, Mimi Zohar wrote:

> We're here, because fput() called schedule_work() to delay the last
> fput(). The execution needs to take place before the syscall returns to
> userspace. Need to read __schedule()... Do you know if cond_resched()
> can guarantee that it will be executed before the return to userspace?

Some clarifications :

- fput() does not call schedule_work() in this case but task_work_add()

- cond_resched() wont return to userspace.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/