From: Al Viro Date: Sun, 19 Aug 2012 16:30:45 +0000 (-0400) Subject: fanotify: sanitize failure exits in copy_event_to_user() X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~36^2~64 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=352e3b249284235e00745f3e71fc348b913e5deb;p=pandora-kernel.git fanotify: sanitize failure exits in copy_event_to_user() * do copy_to_user() before prepare_for_access_response(); that kills the need in remove_access_response(). * don't do fd_install() until we are past the last possible failure exit. Don't use sys_close() on cleanup side - just put_unused_fd() and fput(). Less racy that way... Signed-off-by: Al Viro --- Reading git-diff-tree failed