]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cred: switch to using atomic_long_t
authorJens Axboe <axboe@kernel.dk>
Fri, 15 Dec 2023 20:24:10 +0000 (13:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2023 14:17:37 +0000 (15:17 +0100)
commitf21b7610d55f7af316a060cff522bf0ea85e6e9b
treecd10709735adeb1e4ed9f02400e9fe5ecf56d80a
parent3a1428640259d893424eb1cd1e45dc2daf72d087
cred: switch to using atomic_long_t

commit f8fa5d76925991976b3e7076f9d1052515ec1fca upstream.

There are multiple ways to grab references to credentials, and the only
protection we have against overflowing it is the memory required to do
so.

With memory sizes only moving in one direction, let's bump the reference
count to 64-bit and move it outside the realm of feasibly overflowing.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/cred.h
kernel/cred.c