]> git.itanic.dy.fi Git - linux-stable/commit
cred: switch to using atomic_long_t
authorJens Axboe <axboe@kernel.dk>
Fri, 15 Dec 2023 20:24:10 +0000 (13:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Dec 2023 22:08:46 +0000 (14:08 -0800)
commitf8fa5d76925991976b3e7076f9d1052515ec1fca
treec4f3a3499057e652b189ea296badff01c72ca276
parent3bd7d748816927202268cb335921f7f68b3ca723
cred: switch to using atomic_long_t

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>
include/linux/cred.h
kernel/cred.c