Revert "ucounts: Increase ucounts reference counter before the security hook"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Sep 2021 14:06:21 +0000 (16:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Sep 2021 06:48:59 +0000 (08:48 +0200)
commit0c1443874e1cb359b377a0e383c0dcce81aefa12
treeebfe81e6f257517a8dcb31be87e91ff577553622
parent0479b2bd2959ae03e7f727a797ea87b3d0b7dfb2
Revert "ucounts: Increase ucounts reference counter before the security hook"

This reverts commit b493af3a66e067f93e5e03465507866ddeabff9e which is
commit bbb6d0f3e1feb43d663af089c7dedb23be6a04fb 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@xmission.com>
Link: https://lore.kernel.org/r/87v93k4bl6.fsf@disp2133
Cc: Alexey Gladkov <legion@kernel.org>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/cred.c