Commit 4a761b8c1d7a3a4ee7ccf92ce255d986f601e067
Committed by
Al Viro
1 parent
41126226e1
Exists in
master
and in
39 other branches
[patch 2/2] Use find_task_by_vpid in audit code
The pid to lookup a task by is passed inside audit code via netlink message. Thanks to Denis Lunev, netlink packets are now (since 2.6.24) _always_ processed in the context of the sending task. So this is correct to lookup the task with find_task_by_vpid() here. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
kernel/audit.c
... | ... | @@ -455,7 +455,7 @@ |
455 | 455 | int err; |
456 | 456 | |
457 | 457 | read_lock(&tasklist_lock); |
458 | - tsk = find_task_by_pid(pid); | |
458 | + tsk = find_task_by_vpid(pid); | |
459 | 459 | err = -ESRCH; |
460 | 460 | if (!tsk) |
461 | 461 | goto out; |
... | ... | @@ -871,7 +871,7 @@ |
871 | 871 | struct task_struct *tsk; |
872 | 872 | |
873 | 873 | read_lock(&tasklist_lock); |
874 | - tsk = find_task_by_pid(pid); | |
874 | + tsk = find_task_by_vpid(pid); | |
875 | 875 | if (!tsk) |
876 | 876 | err = -ESRCH; |
877 | 877 | else { |
... | ... | @@ -894,7 +894,7 @@ |
894 | 894 | if (s->enabled != 0 && s->enabled != 1) |
895 | 895 | return -EINVAL; |
896 | 896 | read_lock(&tasklist_lock); |
897 | - tsk = find_task_by_pid(pid); | |
897 | + tsk = find_task_by_vpid(pid); | |
898 | 898 | if (!tsk) |
899 | 899 | err = -ESRCH; |
900 | 900 | else { |