From: Al Viro Date: Wed, 11 Jan 2012 03:20:12 +0000 (-0500) Subject: autofs4: autofs4_wait() vs. autofs4_catatonic_mode() race X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2394d99fcee6228f73dd6ecf5b7222024075d0aa;p=pandora-kernel.git autofs4: autofs4_wait() vs. autofs4_catatonic_mode() race commit 4041bcdc7bef06a2fb29c57394c713a74bd13b08 upstream. We need to recheck ->catatonic after autofs4_wait() got ->wq_mutex for good, or we might end up with wq inserted into queue after autofs4_catatonic_mode() had done its thing. It will stick there forever, since there won't be anything to clear its ->name.name. A bit of a complication: validate_request() drops and regains ->wq_mutex. It actually ends up the most convenient place to stick the check into... Acked-by: Ian Kent Signed-off-by: Al Viro Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed