[systemd-devel] [PATCH] readahead-collect.c: ignore EACCES for fanotify

Lennart Poettering lennart at poettering.net
Wed May 25 09:18:03 PDT 2011


On Wed, 25.05.11 13:09, harald at redhat.com (harald at redhat.com) wrote:

> From: Harald Hoyer <harald at redhat.com>
> 
> At the start of auditd, we are temporarily not able to read
> from the fanotify fd. Ignoring it, seems to work.
> ---
>  src/readahead-collect.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/readahead-collect.c b/src/readahead-collect.c
> index 3c48a02..913a340 100644
> --- a/src/readahead-collect.c
> +++ b/src/readahead-collect.c
> @@ -380,7 +380,7 @@ static int collect(const char *root) {
>  
>                  if ((n = read(fanotify_fd, &data, sizeof(data))) < 0) {
>  
> -                        if (errno == EINTR || errno == EAGAIN)
> +                        if (errno == EINTR || errno == EAGAIN || errno == EACCES)
>                                  continue;
>  
>                          log_error("Failed to read event: %m");

Thanks! Applied! (and added a comment that this is just a temporary
workaround for a broken kernel and we will remove this eventually)

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list