From: Lino Sanfilippo Date: Thu, 2 Dec 2010 10:03:43 +0000 (+0100) Subject: fanotify: synchronize adding/removing a mark by means of group mutex X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7d2f73875d01d01e14309be5c9f03b0b45c7f5b;p=pandora-kernel.git fanotify: synchronize adding/removing a mark by means of group mutex When removing flags from the mask of a mark the mask may go to 0 and the mark should be destroyed. But right before we destroy it there is a race which allows a concurrent process to add flags to the mask of the same marks that we are going to destroy. Thus we might end up destroying a mark that has not all flags cleared in its mask. This patch uses the group mutex to serialize the access to a mark, so that a concurrent concurrent process can no longer access it if it is going to be destroyed. Signed-off-by: Lino Sanfilippo Signed-off-by: Eric Paris --- Reading git-diff-tree failed