linux/fs/notify/fanotify
Lino Sanfilippo fa218ab98c fanotify: correct broken ref counting in case adding a mark failed
If adding a mount or inode mark failed fanotify_free_mark() is called explicitly.
But at this time the mark has already been put into the destroy list of the
fsnotify_mark kernel thread. If the thread is too slow it will try to decrease
the reference of a mark, that has already been freed by fanotify_free_mark().
(If its fast enough it will only decrease the marks ref counter from 2 to 1 - note
that the counter has been increased to 2 in add_mark() - which has practically no
effect.)

This patch fixes the ref counting by not calling free_mark() explicitly, but
decreasing the ref counter and rely on the fsnotify_mark thread to cleanup in
case adding the mark has failed.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
2010-12-07 16:14:21 -05:00
..
fanotify_user.c fanotify: correct broken ref counting in case adding a mark failed 2010-12-07 16:14:21 -05:00
fanotify.c fanotify: ignore events on directories unless specifically requested 2010-10-28 17:22:16 -04:00
Kconfig fanotify: default Kconfig to n 2010-07-28 09:59:03 -04:00
Makefile fanotify: fanotify_init syscall declaration 2010-07-28 09:58:55 -04:00