• Kirill Korotaev's avatar
    [PATCH] fixed pidhashing patch · 37cbd41d
    Kirill Korotaev authored
    This patch fixes strange and obscure pid implementation in current kernels:
    - it removes calling of put_task_struct() from detach_pid()
      under tasklist_lock. This allows to use blocking calls
      in security_task_free() hooks (in __put_task_struct()).
    - it saves some space = 5*5 ints = 100 bytes in task_struct
    - it's smaller and tidy, more straigthforward and doesn't use
      any knowledge about pids using and assignment.
    - it removes pid_links and pid_struct doesn't hold reference counters
      on task_struct. instead, new pid_structs and linked altogether and
      only one of them is inserted in hash_list.
    
    Signed-off-by: Kirill Korotaev (kksx@mail.ru)
    Signed-off-by: default avatarWilliam Irwin <wli@holomorphy.com>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    37cbd41d
base.c 41.9 KB