public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@sophos.com>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: Eric Paris <eparis@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] fanotify: flush outstanding perm requests on group destroy
Date: Tue, 24 Aug 2010 10:51:29 +0100	[thread overview]
Message-ID: <201008241051.29656.tvrtko.ursulin@sophos.com> (raw)
In-Reply-To: <201008241136.30064.agruen@suse.de>

On Tuesday 24 Aug 2010 10:36:29 Andreas Gruenbacher wrote:
> On Tuesday 24 August 2010 10:49:45 Tvrtko Ursulin wrote:
> > I think just switching to interruptible sleep in
> > fanotify_get_response_from_access should be fine. And it should probably
> > deny the current event when signal is received.
>
> Well the result would be -EINTR from the system call that blocked on the
> perm event, the same as with an interruptible nfs mount.  The process would
> never get -EPERM.  Processes may
> not be prepared to handle -EINTR in all cases, and so it may make more
> sense to use the same behavior as NFS and only allow SIGKILL to kill a
> process blocked on a perm event (which the blocked process will never
> see).

That would be wait_event_killable then, even simpler change.

I agree that hiding -EINTR from open, from userspace code is probably a more
compatible way of doing it. If I remember correctly POSIX does allow EINTR
from open but form our experience there are indeed applications which do not
handle it. Some version of X immediately spring to mind who used to set up a
periodic signal delivery (something like internal jiffy, I think they called
it smart scheduler) to themselves and would not handle -EINTR from open. Samba
also had a problem here in specific circumstances.

Tvrtko


Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 348 3873 20.

      reply	other threads:[~2010-08-24  9:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23  0:37 [PATCH 1/4] fanotify: flush outstanding perm requests on group destroy Eric Paris
2010-08-23  0:37 ` [PATCH 2/4] fanotify: drop duplicate pr_debug statement Eric Paris
2010-08-23  0:37   ` [PATCH 3/4] fanotify: resize pid and reorder structure Eric Paris
2010-08-23  0:37     ` [PATCH 4/4] fanotify: drops the packed attribute from userspace event metadata Eric Paris
2010-08-23 16:13       ` Andreas Gruenbacher
2010-08-24  1:13 ` [PATCH 1/4] fanotify: flush outstanding perm requests on group destroy Andreas Gruenbacher
2010-08-24  8:49   ` Tvrtko Ursulin
2010-08-24  9:36     ` Andreas Gruenbacher
2010-08-24  9:51       ` Tvrtko Ursulin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201008241051.29656.tvrtko.ursulin@sophos.com \
    --to=tvrtko.ursulin@sophos.com \
    --cc=agruen@suse.de \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox