Thread (2 messages) 2 messages, 2 authors, 2016-09-22

Locking rules for fscrypt_operations->set_context()

From: Richard Weinberger <richard@nod.at>
Date: 2016-09-20 14:30:06
Also in: linux-fsdevel, lkml

Hi!

To my understanding ->setxattr() is always being called with i_mutex held.
->set_context() in ext4 stores the security context using ext4_xattr_set(),
but the fs crypto framework does not lock the inode itself.
So, depending on the call path, ext4_xattr_set() is sometimes being
called with i_mutex held and some times not.

What are the locking rules for fscrypt_operations and especially ->set_context()?

Thanks,
//richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help