aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-memmove.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2021-10-16 13:50:48 -0500
committerEric W. Biederman <ebiederm@xmission.com>2021-10-20 10:45:34 -0500
commit5fc9e37cd5ae762b856912cdedb226a884b3c3e0 (patch)
tree9f988eb3120b1d61b23ae53a85a2b1955cc5d794 /lib/test_fortify/write_overflow-memmove.c
parent99c31f9feda41d0f10d030dc04ba106c93295aa2 (diff)
ucounts: Remove unnecessary test for NULL ucount in get_ucounts
All of the callers of get_ucounts are passeds a non-NULL value so stop handling a NULL ucounts pointer in get_ucounts. It is guaranteed that ever valid fully formed cred that is passed to commit_cred contains a non-NULL ucounts pointer. This in turn gurantees that current_ucounts() never returns NULL. The call of get_ucounts in user_shm_lock is always passed current_ucounts(). The call of get_ucounts in mqueue_get_inode is always passed current_ucounts(). The call of get_ucounts in inc_rlmit_get_ucounts is always passed iter, after iter has been verified to be non-NULL. The call of get_ucounts in key_change_session_keyring is always passed current_ucounts(). The call of get_ucounts in prepare_cred is always passed current_ucounts(). The call of get_ucounts in prepare_kernel_cred is always passed task->cred->ucounts or init_cred->ucounts which being on tasks are guaranteed to have a non-NULL ucounts field. Link: https://lkml.kernel.org/r/87v91uqksg.fsf_-_@disp2133 Tested-by: Yu Zhao <yuzhao@google.com> Reviewed-by: Alexey Gladkov <legion@kernel.org> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'lib/test_fortify/write_overflow-memmove.c')
0 files changed, 0 insertions, 0 deletions