[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1419985309.5162.79.camel@localhost>
Date: Tue, 30 Dec 2014 19:21:49 -0500
From: Eric Paris <eparis@...hat.com>
To: ivo welch <ivo.welch@...il.com>
Cc: Heinrich Schuchardt <xypron.glpk@....de>,
linux-kernel@...r.kernel.org
Subject: Re: fanotify bug on gdb -- hard crash
On Mon, 2014-12-29 at 13:06 +0800, ivo welch wrote:
> thank you, eric. will do. I read up on it above and now understand it better.
Great let us know if it keeps giving you trouble!
> the example in the man page seems somewhat misfortunate. I would use
> an example that does not, by default, lock up the user system.
> (perhaps add a second example with the _PERM feature that shows how it
> responds.)
The link you gave does respond and allow permissions:
if (metadata->fd >= 0) {
/* Handle open permission event */
if (metadata->mask & FAN_OPEN_PERM) {
printf("FAN_OPEN_PERM: ");
/* Allow file to be opened */
response.fd = metadata->fd;
response.response = FAN_ALLOW;
write(fd, &response,
sizeof(struct fanotify_response));
}
That's the key bit of the example... If you use gdb and never get to
there, you are in a bit of trouble, I agree!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists