Re: [PATCH] keys: safe concurrent user->{session,uid}_keyring access

2019-04-10 Thread James Morris
On Wed, 27 Mar 2019, Jann Horn wrote: > The current code can perform concurrent updates and reads on > user->session_keyring and user->uid_keyring. Add a comment to > struct user_struct to document the nontrivial locking semantics, and use > READ_ONCE() for unlocked readers and smp_store_release()

[PATCH] keys: safe concurrent user->{session,uid}_keyring access

2019-03-27 Thread Jann Horn
The current code can perform concurrent updates and reads on user->session_keyring and user->uid_keyring. Add a comment to struct user_struct to document the nontrivial locking semantics, and use READ_ONCE() for unlocked readers and smp_store_release() for writers to prevent memory ordering issues.