From: Al Viro Date: Fri, 29 Oct 2010 07:30:42 +0000 (-0400) Subject: fix open/umount race X-Git-Tag: v2.6.37-rc1~44^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d893f1bc2a9f0f7dcb4b433452c59f9bedac0d7d;p=pandora-kernel.git fix open/umount race nameidata_to_filp() drops nd->path or transfers it to opened file. In the former case it's a Bad Idea(tm) to do mnt_drop_write() on nd->path.mnt, since we might race with umount and vfsmount in question might be gone already. Fix: don't drop it, then... IOW, have nameidata_to_filp() grab nd->path in case it transfers it to file and do path_drop() in callers. After they are through with accessing nd->path... Reported-by: Miklos Szeredi Signed-off-by: Al Viro --- Reading git-diff-tree failed