Skip to content

signalfd/epoll fixes

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 8 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2epoll: introduce POLLFREE to flush ->signalfd_wqh before kfree()fs/eventpoll.c fs/signalfd.c include/asm-generic/poll.h +2 more+25 -24 replies
2/2epoll: ep_unregister_pollwait() can use the freed pwq->wheadfs/eventpoll.c fs/signalfd.c+32 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] signalfd/epoll fixes
Quoted 9 lines · Linus Torvalds
Quoted 6 lines · Oleg Nesterov

Or we can rely on the fact that sighand_cachep is SLAB_DESTROY_BY_RCU, and assume that ->whead is always rcu-protected if it can go away.

In this case we don't need 3/4 (although it makes sense to add the fat comment), and 4/4 can be simplified, see below.

Quoted 6 lines

Ok.

Can you also get rid of 1/4, because quite frankly, adding that BUG_ON() is just annoying. Either the thing gets fixed or not, but at no point is it ok to say "ok, I'm going to fix it, but before I do I'll just make it much worse".

OK. Please see v2.

Other changes:

- some comments

- now that we rely on rcu, ep_poll_callback() can do remove_wait_queue() outsife of ep->lock

Davide, I see the new email, but it is too late for me to reply today. Anyway, I think it makes sense to make the "simple" fix before anything else. IOW, I'd suggest these changes for now in any case (unless, of course, you see some problems).

Oleg.