Skip to content

Commit 1aa3f27

Browse files
committed
Revert "cred: add missing return error code when set_cred_ucounts() failed"
This reverts commit 0855952 which is commit 5e6b8a5 upstream. The "original" commit 905ae01 ("Add a reference to ucounts for each cred"), should not have been applied to the 5.10.y tree, so revert it, and the follow-on fixup patches as well. Reported-by: "Eric W. Biederman" <ebiederm@xmission.com> Link: https://lore.kernel.org/r/87v93k4bl6.fsf@disp2133 Cc: Yang Yingliang <yangyingliang@huawei.com> Cc: Alexey Gladkov <legion@kernel.org> Cc: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0c14438 commit 1aa3f27

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎kernel/cred.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,7 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags)
372372
ret = create_user_ns(new);
373373
if (ret < 0)
374374
goto error_put;
375-
ret = set_cred_ucounts(new);
376-
if (ret < 0)
375+
if (set_cred_ucounts(new) < 0)
377376
goto error_put;
378377
}
379378

0 commit comments

Comments
 (0)