• David Howells's avatar
    [PATCH] Properly share process and session keyrings with CLONE_THREAD [try #2] · f6480aaa
    David Howells authored
    The attached patch causes process and session keyrings to be shared
    properly when CLONE_THREAD is in force.  It does this by moving the keyring
    pointers into struct signal_struct[*].
    
    [*] I have a patch to rename this to struct thread_group that I'll revisit
    after the advent of 2.6.11.
    
    Furthermore, once this patch is applied, process keyrings will no longer be
    allocated at fork, but will instead only be allocated when needed.
    Allocating them at fork was a way of half getting around the sharing across
    threads problem, but that's no longer necessary.
    
    This revision of the patch has the documentation changes patch rolled into it
    and no longer abstracts the locking for signal_struct into a pair of macros.
    Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    f6480aaa
process_keys.c 15.6 KB