Revert "cred: add missing return error code when set_cred_ucounts() failed"
This reverts commit0855952ed4which is commit5e6b8a50a7upstream. The "original" commit905ae01c4a("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>
This commit is contained in:
@@ -372,8 +372,7 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags)
|
||||
ret = create_user_ns(new);
|
||||
if (ret < 0)
|
||||
goto error_put;
|
||||
ret = set_cred_ucounts(new);
|
||||
if (ret < 0)
|
||||
if (set_cred_ucounts(new) < 0)
|
||||
goto error_put;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user