mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
audit: Use struct net not pid_t to remember the network namespce to reply in
While reading through 3.14-rc1 I found a pretty siginficant mishandling of network namespaces in the recent audit changes. In struct audit_netlink_list and audit_reply add a reference to the network namespace of the caller and remove the userspace pid of the caller. This cleanly remembers the callers network namespace, and removes a huge class of races and nasty failure modes that can occur when attempting to relook up the callers network namespace from a pid_t (including the caller's network namespace changing, pid wraparound, and the pid simply not being present). Signed-off-by: "Eric W. Biederman" <[email protected]> Acked-by: Richard Guy Briggs <[email protected]> Signed-off-by: Eric Paris <[email protected]>
This commit is contained in:
parent
3f1c82502c
commit
638a0fd2a0
3 changed files with 9 additions and 6 deletions
|
|
@ -253,7 +253,7 @@ extern void audit_panic(const char *message);
|
|||
|
||||
struct audit_netlink_list {
|
||||
__u32 portid;
|
||||
pid_t pid;
|
||||
struct net *net;
|
||||
struct sk_buff_head q;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue