aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-03 11:50:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-03 11:50:52 -0400
commit0302e28dee643932ee7b3c112ebccdbb9f8ec32c (patch)
tree405d4cb3f772ef069ed7f291adc4b74a4e73346e /kernel/fork.c
parent89c9fea3c8034cdb2fd745f551cde0b507fd6893 (diff)
parent8979b02aaf1d6de8d52cc143aa4da961ed32e5a2 (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris: "Highlights: IMA: - provide ">" and "<" operators for fowner/uid/euid rules KEYS: - add a system blacklist keyring - add KEYCTL_RESTRICT_KEYRING, exposes keyring link restriction functionality to userland via keyctl() LSM: - harden LSM API with __ro_after_init - add prlmit security hook, implement for SELinux - revive security_task_alloc hook TPM: - implement contextual TPM command 'spaces'" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (98 commits) tpm: Fix reference count to main device tpm_tis: convert to using locality callbacks tpm: fix handling of the TPM 2.0 event logs tpm_crb: remove a cruft constant keys: select CONFIG_CRYPTO when selecting DH / KDF apparmor: Make path_max parameter readonly apparmor: fix parameters so that the permission test is bypassed at boot apparmor: fix invalid reference to index variable of iterator line 836 apparmor: use SHASH_DESC_ON_STACK security/apparmor/lsm.c: set debug messages apparmor: fix boolreturn.cocci warnings Smack: Use GFP_KERNEL for smk_netlbl_mls(). smack: fix double free in smack_parse_opts_str() KEYS: add SP800-56A KDF support for DH KEYS: Keyring asymmetric key restrict method with chaining KEYS: Restrict asymmetric key linkage using a specific keychain KEYS: Add a lookup_restriction function for the asymmetric key type KEYS: Add KEYCTL_RESTRICT_KEYRING KEYS: Consistent ordering for __key_link_begin and restrict check KEYS: Add an optional lookup_restriction hook to key_type ...
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 56d85fd81411..dd5a371c392a 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1681,9 +1681,12 @@ static __latent_entropy struct task_struct *copy_process(
1681 goto bad_fork_cleanup_perf; 1681 goto bad_fork_cleanup_perf;
1682 /* copy all the process information */ 1682 /* copy all the process information */
1683 shm_init_task(p); 1683 shm_init_task(p);
1684 retval = copy_semundo(clone_flags, p); 1684 retval = security_task_alloc(p, clone_flags);
1685 if (retval) 1685 if (retval)
1686 goto bad_fork_cleanup_audit; 1686 goto bad_fork_cleanup_audit;
1687 retval = copy_semundo(clone_flags, p);
1688 if (retval)
1689 goto bad_fork_cleanup_security;
1687 retval = copy_files(clone_flags, p); 1690 retval = copy_files(clone_flags, p);
1688 if (retval) 1691 if (retval)
1689 goto bad_fork_cleanup_semundo; 1692 goto bad_fork_cleanup_semundo;
@@ -1907,6 +1910,8 @@ bad_fork_cleanup_files:
1907 exit_files(p); /* blocking */ 1910 exit_files(p); /* blocking */
1908bad_fork_cleanup_semundo: 1911bad_fork_cleanup_semundo:
1909 exit_sem(p); 1912 exit_sem(p);
1913bad_fork_cleanup_security:
1914 security_task_free(p);
1910bad_fork_cleanup_audit: 1915bad_fork_cleanup_audit:
1911 audit_free(p); 1916 audit_free(p);
1912bad_fork_cleanup_perf: 1917bad_fork_cleanup_perf: