[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210906125450.027579655@linuxfoundation.org>
Date: Mon, 6 Sep 2021 14:55:22 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Yang Yingliang <yangyingliang@...wei.com>,
Alexey Gladkov <legion@...nel.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.10 07/29] Revert "cred: add missing return error code when set_cred_ucounts() failed"
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
This reverts commit 0855952ed4f1a6861fbb0e5d684efd447d7347c9 which is
commit 5e6b8a50a7cec5686ee2c4bda1d49899c79a7eae upstream.
The "original" commit 905ae01c4ae2 ("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@...ssion.com>
Link: https://lore.kernel.org/r/87v93k4bl6.fsf@disp2133
Cc: Yang Yingliang <yangyingliang@...wei.com>
Cc: Alexey Gladkov <legion@...nel.org>
Cc: Sasha Levin <sashal@...nel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
kernel/cred.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -372,8 +372,7 @@ int copy_creds(struct task_struct *p, un
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;
}
Powered by blists - more mailing lists