diff options
author | Kawai, Hidehiro <hidehiro.kawai.ez@hitachi.com> | 2007-07-19 04:48:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:46 -0400 |
commit | 6c5d523826dc639df709ed0f88c5d2ce25379652 (patch) | |
tree | ef2fa8cb30266b3a9b047902794e78c583b099da /fs/proc | |
parent | 76fdbb25f963de5dc1e308325f0578a2f92b1c2d (diff) |
coredump masking: reimplementation of dumpable using two flags
This patch changes mm_struct.dumpable to a pair of bit flags.
set_dumpable() converts three-value dumpable to two flags and stores it into
lower two bits of mm_struct.flags instead of mm_struct.dumpable.
get_dumpable() behaves in the opposite way.
[akpm@linux-foundation.org: export set_dumpable]
Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: David Howells <dhowells@redhat.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 42cb4f5613b6..49b3ab0175e0 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1014,7 +1014,7 @@ static int task_dumpable(struct task_struct *task) | |||
1014 | task_lock(task); | 1014 | task_lock(task); |
1015 | mm = task->mm; | 1015 | mm = task->mm; |
1016 | if (mm) | 1016 | if (mm) |
1017 | dumpable = mm->dumpable; | 1017 | dumpable = get_dumpable(mm); |
1018 | task_unlock(task); | 1018 | task_unlock(task); |
1019 | if(dumpable == 1) | 1019 | if(dumpable == 1) |
1020 | return 1; | 1020 | return 1; |