Re: [rfc] new poll callback'd wake up hell ...

Davide Libenzi (davidel@xmailserver.org)
Mon, 25 Nov 2002 14:36:03 -0800 (PST)


On Mon, 25 Nov 2002, John Myers wrote:

> Davide Libenzi writes:
> > 1) Move the wake_up() call done inside the poll callback outside the lock
>
> You can't. You need to hold the lock over the callback or your callback
> could end up accessing a freed epitem.

No, look at the code :

http://www.xmailserver.org/linux-patches/sys_epoll-2.5.49-0.58.diff

The function ep_collect_ready_items() increases the usage count under
lock. So the epintem is protected, and the file* cannot desappear because
of the read lock on epsem.

- Davide

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