Recognizing that the audit context is an internal audit value, use an access function to set the audit context pointer for the task rather than reaching directly into the task struct to set it.
Showing the changes to kernel/fork.c (1 of 3 files). Show all
Unified · Split
| @@ -1713,7 +1713,7 @@ static __latent_entropy struct task_struct *copy_process( · 1712 unmodified lines | ||
| 1713 | 1713 | p->start_time = ktime_get_ns(); |
| 1714 | 1714 | p->real_start_time = ktime_get_boot_ns(); |
| 1715 | 1715 | p->io_context = NULL; |
| 1716 | − p->audit_context = NULL; | |
| 1716 | + audit_set_context(p, NULL); | |
| 1717 | 1717 | cgroup_fork(p); |
| 1718 | 1718 | #ifdef CONFIG_NUMA |
| 1719 | 1719 | p->mempolicy = mpol_dup(p->mempolicy); |