[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <d8aa5094-8042-4172-8e1d-7d2c7f2299a7@us-col-exch1.green.sophos>
Date: Fri, 10 Dec 2010 15:32:48 +0000
From: Tvrtko Ursulin <tvrtko.ursulin@...hos.com>
To: Eric Paris <eparis@...hat.com>, Al Viro <viro@...iv.linux.org.uk>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Polling(2) /proc/mounts is broken?
Hi all,
So since we cannot get fanotify global mode we were told to poll(2) on
/proc/mounts and set up new mount marks dynamically.
Is the attached C program roughly how it should work?
Because on 2.6.37-rc5 it busy loops for me (POLLIN always reported), even
though if I remove the seek it gets EOF immediately after POLLIN.
Under 2.6.32 (Ubuntu flavour) I see the same behaviour.
Going further back to 2.6.24 (again Ubuntu flavour) and there it works, but it
set POLLERR instead of POLLIN in revents.
So I guess it regressed somewhere in between. I'll look to provide a fix
unless someone more familiar with this area beats me to it.
Tvrtko
Sophos Limited, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 991 2418 08.
View attachment "pollmounts.c" of type "text/x-csrc" (760 bytes)
Powered by blists - more mailing lists