Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754820AbZA0U7Z (ORCPT ); Tue, 27 Jan 2009 15:59:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751508AbZA0U7R (ORCPT ); Tue, 27 Jan 2009 15:59:17 -0500 Received: from x35.xmailserver.org ([64.71.152.41]:40468 "EHLO x35.xmailserver.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751492AbZA0U7Q (ORCPT ); Tue, 27 Jan 2009 15:59:16 -0500 X-AuthUser: davidel@xmailserver.org Date: Tue, 27 Jan 2009 12:59:14 -0800 (PST) From: Davide Libenzi X-X-Sender: davide@alien.or.mcafeemobile.com To: Linux Kernel Mailing List cc: Andrew Morton , Pavel Pisa Subject: Re: [patch 1/2] epoll fix own poll() In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (DEB 962 2008-03-14) X-GPG-FINGRPRINT: CFAE 5BEE FD36 F65E E640 56FE 0974 BF23 270F 474E X-GPG-PUBLIC_KEY: http://www.xmailserver.org/davidel.asc MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1795850513-728520103-1233089955=:20262" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 13859 Lines: 241 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1795850513-728520103-1233089955=:20262 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 27 Jan 2009, Davide Libenzi wrote: > > The follwing patch fixes a bug inside the epoll's f_op->poll() code, that > returns POLLIN even though there are no actual ready monitored fds. > The bug shows up if you add an epoll fd inside another fd container (poll, > select, epoll). > The problem is that callback-based wake ups used by epoll, does not carry > (patches will follow, to fix this) any information about the events > that actually happened. So the callback code, since it can't call the file* > ->poll() inside the callback, chains the file* into a ready-list. So, suppose > you added an fd with EPOLLOUT only, and some data shows up on the fd, the > file* mapped by the fd will be added into the ready-list (via wakeup > callback). During normal epoll_wait() use, this condition is sorted out > at the time we're actually able to call the file*'s f_op->poll(). > Inside the old epoll's f_op->poll() though, only a quick check > !list_empty(ready-list) was performed, and this could have led to reporting > POLLIN even though no ready fds would show up at a following epoll_wait(). > In order to correctly report the ready status for an epoll fd, the ready-list > must be checked to see if any really available fd+event would be ready in > a following epoll_wait(). > Operation (calling f_op->poll() from inside f_op->poll()) that, like wake ups, > must be handled with care because of the fact that epoll fds can be added > to other epoll fds. Forgot to include the test program that can be used to check for correct event reporting, and long-chains/loop trimming code. - Davide --1795850513-728520103-1233089955=:20262 Content-Type: TEXT/x-csrc; name=epoll_test.c Content-Transfer-Encoding: BASE64 Content-Description: Content-Disposition: attachment; filename=epoll_test.c LyoNCiAqICBlcG9sbF90ZXN0IGJ5IERhdmlkZSBMaWJlbnppIChTaW1wbGUg Y29kZSB0byB0ZXN0IGVwb2xsIGludGVybmFscykNCiAqICBDb3B5cmlnaHQg KEMpIDIwMDggIERhdmlkZSBMaWJlbnppDQogKg0KICogIFRoaXMgcHJvZ3Jh bSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBh bmQvb3IgbW9kaWZ5DQogKiAgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBH TlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkNCiAq ICB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lv biAyIG9mIHRoZSBMaWNlbnNlLCBvcg0KICogIChhdCB5b3VyIG9wdGlvbikg YW55IGxhdGVyIHZlcnNpb24uDQogKg0KICogIFRoaXMgcHJvZ3JhbSBpcyBk aXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVs LA0KICogIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVu IHRoZSBpbXBsaWVk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XQsIGVy cm9yID09IDAgPw0KCQkiKioqKioqKioqKiBPS1xuIjogIioqKioqKioqKiog RkFJTCAoJWQpXG4iLCBlcnJvcik7DQoNCg0KCXJldHVybiAwOw0KfQ0KDQo= --1795850513-728520103-1233089955=:20262-- -- 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/