Re: [PATCH 1/2] fsnotify: fix NULL dereference in send_to_group()

From: Eric Paris
Date: Sat Aug 28 2010 - 17:20:11 EST


On Sun, 2010-08-29 at 00:55 +0530, Csaba Henk wrote:
> If fanotify is triggered via a vfsmount mark (so that there is
> no inode mark, group in send_to_group() is set from a structure
> member where the struct pointer is NULL.
>
> This can be tested with the fanotify utility available from
> http://people.redhat.com/eparis/fanotify/:
>
> # fanotify -m / & touch /x

This should be fixed in the pull request I sent to Linus last night.
Sorry you had to track it down as well. There are a number of other bug
fixes in my tree

http://git.infradead.org/users/eparis/notify.git

There might still be some code duplication which something like 2/2
could clean up but your patch does apply to my devel tree and it has a
logic flaw. In the case we have both a vfsmount and an inode mark we
need to test:

event_mask & vmark->mask & ~vmark->ignored_mask & ~imark->ignored mask.

You would only ever test one or the other, not both together like that.

Thanks! Please let me know any other problems you run into!

-Eric

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/