Name

proc_pid_unhash — Unhash /proc/pid entry from the dcache.

Synopsis

struct dentry * proc_pid_unhash (struct task_struct * p);

Arguments

p

task that should be flushed.

Description

Drops the /proc/pid dcache entry from the hash chains.

Dropping /proc/pid entries and detach_pid must be synchroneous, otherwise e.g. /proc/pid/exe might point to the wrong executable, if the pid value is immediately reused. This is enforced by - caller must acquire spin_lock(p->proc_lock) - must be called before detach_pid - proc_pid_lookup acquires proc_lock, and checks that the target is not dead by looking at the attach count of PIDTYPE_PID.