lkml.org 
[lkml]   [2004]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH] fixed pidhashing patch
Date
>>I've only compiletested my changes, though I have strong reasons to
>>believe they're correct. If Kirill signs off on this, I will too.
>
>
> Kirill?

I cleanuped it once again. It compiles/works fine.
Hope there will be no more problems with it.

list of small changes:
- FIXED bug in do_each_task_pid() made by Lee. last task was skipped in the loop, removed __list__ var.
- remade patch against latest tree (there was a conflict in exit.c)
- returned 'extern' in find_pid() declaration
- fixed style a bit in detach_pid(), find_task_by_pid_type()

Original comment:
-------------------------------------------------------------------
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)
-------------------------------------------------------------------

Kirill

[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.038 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site