> On Thu, 07 Dec 2006 10:29:39 +0000 David Howells <[email protected]> wrote: > Andrew Morton <[email protected]> wrote: > > > I guess I don't understand exactly what problem the noautorel stuff is > > trying to solve. It _seems_ to me that in all cases we can simply stuff > > the old `data' field in alongside the controlling work_struct or > > delayed_work which wants to operate on it. > > The problem is that you have to be able to guarantee that the data is still > accessible once you clear the pending bit. The pending bit is your only > guaranteed protection, and once it is clear, the containing structure might be > deallocated. > > I would like to be able to get rid of the NAR bit too, but I'm not confident > that in all cases I can. It'll take a bit more study of the code to be able > to do that. > But anyone who is going to free the structure which contains the work_struct would need to run flush_workqueue() beforehand, after having ensured that the work won't reschedule itself. So the struct-which-contains-the-work_struct is safe during the callback's execution. If that's not being done then the code was buggy in 2.6.19, too.. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Jeff Garzik <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- References:
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- [PATCH] Export current_is_keventd() for libphy
- From: Ben Collins <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: "Maciej W. Rozycki" <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andy Fleming <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Roland Dreier <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: "Maciej W. Rozycki" <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- From: David Howells <[email protected]>
- Re: [PATCH] Export current_is_keventd() for libphy
- Prev by Date: Re: Subtleties of __attribute__((packed))
- Next by Date: Detecting I/O error and Halting System : come back
- Previous by thread: Re: [PATCH] Export current_is_keventd() for libphy
- Next by thread: Re: [PATCH] Export current_is_keventd() for libphy
- Index(es):