]> git.baikalelectronics.ru Git - kernel.git/commit
eCryptfs: move ecryptfs_find_auth_tok_for_sig() call before mutex_lock
authorRoberto Sassu <roberto.sassu@polito.it>
Mon, 21 Mar 2011 15:00:54 +0000 (16:00 +0100)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Mon, 28 Mar 2011 06:49:42 +0000 (01:49 -0500)
commit6a2399d9be0d2e47bc448ceef937b1961b5e6183
treee78bd71ecfd12b87237db398116ac2c19082505b
parentffe4ee6559ca752bb3086b04d9ff2ba1ac99dcd3
eCryptfs: move ecryptfs_find_auth_tok_for_sig() call before mutex_lock

The ecryptfs_find_auth_tok_for_sig() call is moved before the
mutex_lock(s->tfm_mutex) instruction in order to avoid possible deadlocks
that may occur by holding the lock on the two semaphores 'key->sem' and
's->tfm_mutex' in reverse order.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
fs/ecryptfs/keystore.c