]> 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:32:35 +0000 (15:32 +0100)
commiteac54659ff77706569a8419510ca6676b6ff9827
treecca1efb34b93e86bb9015c9983a8896c4b71e6ef
parent0686da1ada51c787610185de6289d8a5006ad263
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