summaryrefslogtreecommitdiffstats
path: root/fs/internal.h
diff options
context:
space:
mode:
authorLino Sanfilippo <LinoSanfilippo@gmx.de>2010-11-09 18:18:16 +0100
committerEric Paris <eparis@redhat.com>2010-12-07 16:14:21 -0500
commitfa218ab98c31eeacd12b89501e6b99d146ea56cc (patch)
tree789e0f922fbb30844a89a4aaf707c01991c74ea3 /fs/internal.h
parentb1085ba80cd2784400a7beec3fda5099198ed01c (diff)
downloadlinux-fa218ab98c31eeacd12b89501e6b99d146ea56cc.tar.gz
linux-fa218ab98c31eeacd12b89501e6b99d146ea56cc.tar.bz2
linux-fa218ab98c31eeacd12b89501e6b99d146ea56cc.zip
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>
Diffstat (limited to 'fs/internal.h')
0 files changed, 0 insertions, 0 deletions