[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120414033953.GA29189@redhat.com>
Date: Sat, 14 Apr 2012 05:39:53 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
David Howells <dhowells@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Alexander Gordeev <agordeev@...hat.com>,
Chris Zankel <chris@...kel.net>,
David Smith <dsmith@...hat.com>,
"Frank Ch. Eigler" <fche@...hat.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Larry Woodman <lwoodman@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/3] task_work_add: generic process-context callbacks
probably I should also comment this part...
On 04/13, Linus Torvalds wrote:
>
> Alternatively, you must make the rule be that the data can only be
> freed by the caller *if* it was returned from "task_work_cancel()".
Exactly.
Once the caller does task_work_add(twork), it no longer "owns" this
twork.
But, if task_work_cancel() succeeds - you own it again.
> But then you can't allocate it on the stack any more, and have to
> allocate it separately.
Yes, unless you do task_work_add/cancel(current).
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists