Running a recent git kernel (around 2.6.26-rc5-git4) and the Fedora
ecryptfs-utils-46-0.fc10.x86_64 doing the following:

1) server export a nfs mount /storage
2) mount that on a client at /storage
3) mkdir /storage/encrypted
4) mount -t ecryptfs /storage/encrypted /storage/encrypted
      #passphrase
      #aes
      #32 bytes

(as a side note if you use selinux you may want to add -o
context=system_u:object_r:nfs_t:s0 to that mount command to keep selinux
from fouling things up)

5) touch /storage/encrypted/hello

and I get the following warning:

 =======================================================
[ INFO: possible circular locking dependency detected ]
2.6.26-rc5 #103
-------------------------------------------------------
touch/2404 is trying to acquire lock:
 (&mount_crypt_stat->global_auth_tok_list_mutex){--..}, at: 
[<ffffffffa033bb1c>] ecryptfs_find_global_auth_tok_for_sig+0x30/0x8e [ecryptfs]

but task is already holding lock:
 (&crypt_stat->keysig_list_mutex){--..}, at: [<ffffffffa033bbee>] 
ecryptfs_generate_key_packet_set+0x74/0xca4 [ecryptfs]

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&crypt_stat->keysig_list_mutex){--..}:
       [<ffffffff810566ef>] __lock_acquire+0xa48/0xc25
       [<ffffffff81056cc1>] lock_acquire+0x5e/0x77
       [<ffffffff812a5268>] mutex_lock_nested+0xf2/0x278
       [<ffffffffa033b952>] ecryptfs_add_keysig+0x63/0x84 [ecryptfs]
       [<ffffffffa033ad48>] ecryptfs_new_file_context+0x9b/0x1ad [ecryptfs]
       [<ffffffffa0336934>] ecryptfs_create+0x1f6/0x2e3 [ecryptfs]
       [<ffffffff810b5bd1>] vfs_create+0xdd/0x152
       [<ffffffff810b8b7c>] do_filp_open+0x20f/0x881
       [<ffffffff810abba0>] do_sys_open+0x51/0xd1
       [<ffffffff810abc49>] sys_open+0x1b/0x1d
       [<ffffffff8100c090>] tracesys+0xd5/0xda
       [<ffffffffffffffff>] 0xffffffffffffffff

-> #0 (&mount_crypt_stat->global_auth_tok_list_mutex){--..}:
       [<ffffffff810565f1>] __lock_acquire+0x94a/0xc25
       [<ffffffff81056cc1>] lock_acquire+0x5e/0x77
       [<ffffffff812a5268>] mutex_lock_nested+0xf2/0x278
       [<ffffffffa033bb1c>] ecryptfs_find_global_auth_tok_for_sig+0x30/0x8e 
[ecryptfs]
       [<ffffffffa033bc57>] ecryptfs_generate_key_packet_set+0xdd/0xca4 
[ecryptfs]
       [<ffffffffa033abdd>] ecryptfs_write_metadata+0x143/0x213 [ecryptfs]
       [<ffffffffa0336963>] ecryptfs_create+0x225/0x2e3 [ecryptfs]
       [<ffffffff810b5bd1>] vfs_create+0xdd/0x152
       [<ffffffff810b8b7c>] do_filp_open+0x20f/0x881
       [<ffffffff810abba0>] do_sys_open+0x51/0xd1
       [<ffffffff810abc49>] sys_open+0x1b/0x1d
       [<ffffffff8100c090>] tracesys+0xd5/0xda
       [<ffffffffffffffff>] 0xffffffffffffffff

other info that might help us debug this:

2 locks held by touch/2404:
 #0:  (&sb->s_type->i_mutex_key#11){--..}, at: [<ffffffff810b8ab5>] 
do_filp_open+0x148/0x881
 #1:  (&crypt_stat->keysig_list_mutex){--..}, at: [<ffffffffa033bbee>] 
ecryptfs_generate_key_packet_set+0x74/0xca4 [ecryptfs]

stack backtrace:
Pid: 2404, comm: touch Not tainted 2.6.26-rc5 #103

Call Trace:
 [<ffffffff81054aaa>] print_circular_bug_tail+0x70/0x7b
 [<ffffffff810565f1>] __lock_acquire+0x94a/0xc25
 [<ffffffff810a5b71>] ? check_bytes_and_report+0x38/0xcb
 [<ffffffff81056cc1>] lock_acquire+0x5e/0x77
 [<ffffffffa033bb1c>] ? 
:ecryptfs:ecryptfs_find_global_auth_tok_for_sig+0x30/0x8e
 [<ffffffff812a5268>] mutex_lock_nested+0xf2/0x278
 [<ffffffffa033bb1c>] ? 
:ecryptfs:ecryptfs_find_global_auth_tok_for_sig+0x30/0x8e
 [<ffffffff810a74e7>] ? kmem_cache_alloc+0x7c/0xa7
 [<ffffffffa033bb1c>] :ecryptfs:ecryptfs_find_global_auth_tok_for_sig+0x30/0x8e
 [<ffffffffa033bc57>] :ecryptfs:ecryptfs_generate_key_packet_set+0xdd/0xca4
 [<ffffffff81194ff0>] ? account+0xe0/0xef
 [<ffffffff8119513c>] ? extract_entropy+0x4c/0x96
 [<ffffffff81080000>] ? add_to_page_cache+0x4/0x9c
 [<ffffffffa033abdd>] :ecryptfs:ecryptfs_write_metadata+0x143/0x213
 [<ffffffffa0336963>] :ecryptfs:ecryptfs_create+0x225/0x2e3
 [<ffffffff81112f00>] ? avc_has_perm+0x4c/0x5e
 [<ffffffff81114b53>] ? may_create+0xee/0xfd
 [<ffffffff810b5bd1>] vfs_create+0xdd/0x152
 [<ffffffff810b8b7c>] do_filp_open+0x20f/0x881
 [<ffffffff81011dfb>] ? native_sched_clock+0x50/0x6d
 [<ffffffff812a69bb>] ? _spin_unlock+0x26/0x2a
 [<ffffffff810abba0>] do_sys_open+0x51/0xd1
 [<ffffffff810abc49>] sys_open+0x1b/0x1d
 [<ffffffff8100c090>] tracesys+0xd5/0xda

If this is already known/fixed sorry to waste your time...


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
eCryptfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecryptfs-devel

Reply via email to