Re: [PATCH] epoll bits 0.34

From: Manfred Spraul (manfred@colorfullife.com)
Date: Mon Nov 11 2002 - 13:09:55 EST


>
>
> - Cleaned up locking
>
The cleanup is dangerous/broken: You call f_op->poll with disabled
interrupts.

> /* We have to drop the new item inside our item list to keep track of it */
> write_lock_irqsave(&ep->lock, flags);
>
>+ /* Add the current item to the hash table */
> list_add(&dpi->llink, ep_hash_entry(ep, ep_hash_index(ep, tfile)));
>
>+ /* Attach the item to the poll hooks and get current event bits */
>+ revents = tfile->f_op->poll(tfile, &pt);
>+
>
>
Which file descriptors are pollable with eventpoll? For example rtc_poll
does

    spin_lock_irq();
    do_work();
    spin_unlock_irq();

I'm sure that there are other drivers that are be affected, I haven't
checked networking.

And is that really needed? Could you do the real work in the poll
callback instead of locking around the f_op call?

--
    Manfred

- 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/



This archive was generated by hypermail 2b29 : Fri Nov 15 2002 - 22:00:22 EST