epoll bits 0.34
Quoted 4 lines
- Cleaned up locking
The cleanup is dangerous/broken: You call f_op->poll with disabled interrupts.
Review
Quoted 11 lines
/* We have to drop the new item inside our item list to keep track of it */ write_lock_irqsave(&ep->lock, flags);(quoted diff) +1
-0+ /* Add the current item to the hash table */list_add(&dpi->llink, ep_hash_entry(ep, ep_hash_index(ep, tfile)));(quoted diff) +3
-0+ /* 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
Quoted 7 lines · Manfred Spraul
Which file descriptors are pollable with eventpoll? For example
rtc_polldoesspin_lock_irq(); do_work(); spin_unlock_irq();
Quoted 5 lines
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_opcall?
I'll take care of it, thx for your precious input.
- Davide