VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Alexey Gladkov <legion@kernel.org> 2021-04-22 14:27:09 +0200 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-07-14 17:06:19 +0200 commit: 1199573d26016f59a6c3e55833065a2b38a4abd5 parent: 9057b6cca1511a77b8b47a6db9ae40304ce4d3a2
Commit Summary:
Add a reference to ucounts for each cred
Diffstat:
1 file changed, 4 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 18594f11c31f..d7c4187ca023 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1360,6 +1360,10 @@ int begin_new_exec(struct linux_binprm * bprm)
 	WRITE_ONCE(me->self_exec_id, me->self_exec_id + 1);
 	flush_signal_handlers(me, 0);
 
+	retval = set_cred_ucounts(bprm->cred);
+	if (retval < 0)
+		goto out_unlock;
+
 	/*
 	 * install the new credentials for this executable
 	 */