Defined in 1 files as a struct:

Defined in 1 files as a prototype:

Defined in 2 files as a member:

Defined in 2 files as a function:

Referenced in 96 files:

Smatch caller information:

fs/coredump.c coredump_parse() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 4
RX_PATH
TASK_NOT_RUNNING

fs/coredump.c vfs_coredump() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 4
RX_PATH
TASK_NOT_RUNNING

kernel/fork.c copy_process() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 6
RX_PATH
TASK_NOT_RUNNING

arch/x86/kernel/shstk.c adjust_shstk_size() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 3
RX_PATH
TASK_NOT_RUNNING

io_uring/rsrc.c __io_account_mem() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
RX_PATH
HALF_LOCKED2 &ctx->uring_lock

io_uring/rsrc.c io_sqe_files_register() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 7
LOCK2 &ctx->uring_lock
TYPE_LOCK (struct io_ring_ctx)->uring_lock

fs/attr.c inode_newsize_ok() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 1
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &inode->i_lock
HALF_LOCKED2 &inode->i_rwsem
HALF_LOCKED2 &inode->i_rwsem
HALF_LOCKED2 &mapping->invalidate_lock
HALF_LOCKED2 &src->i_rwsem
HALF_LOCKED2 &vi->i_rwsem

fs/file.c f_dupfd() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 7

fs/file.c get_unused_fd_flags() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 7
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &ctx->uring_lock
HALF_LOCKED2 &ne_pci_dev->enclaves_list_mutex
HALF_LOCKED2 &p->mutex
HALF_LOCKED2 &tsk->signal->exec_update_lock
HALF_LOCKED2 &ufile->hw_destroy_rwsem
HALF_LOCKED2 &vcpu->mutex
HALF_LOCKED2 _T->lock
HALF_LOCKED2 sk

fs/file.c ksys_dup3() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 7

fs/file.c replace_fd() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 7
HALF_LOCKED2 &match->notify_lock

mm/mmap.c __do_sys_brk() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 2
LOCK2 &mm->mmap_lock
TYPE_LOCK (struct mm_struct)->mmap_lock

mm/mmap.c __do_sys_brk() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 2
LOCK2 &mm->mmap_lock
TYPE_LOCK (struct mm_struct)->mmap_lock

mm/mmap.c may_expand_vm() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 9
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &mm->mmap_lock
HALF_LOCKED2 &vma->anon_vma->root->rwsem

mm/mmap.c may_expand_vm() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 2
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &mm->mmap_lock
HALF_LOCKED2 &vma->anon_vma->root->rwsem

mm/mmap.c may_expand_vm() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 2
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &mm->mmap_lock
HALF_LOCKED2 &vma->anon_vma->root->rwsem

mm/mmap.c may_expand_vm() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 2
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &mm->mmap_lock
HALF_LOCKED2 &vma->anon_vma->root->rwsem

mm/mmap.c mlock_future_ok() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
CAPABLE 0 14
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &mm->mmap_lock
HALF_LOCKED2 &vma->anon_vma->root->rwsem

io_uring/openclose.c __io_openat_prep() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 7
LOCK2 &ctx->uring_lock
HALF_LOCKED2 &sqd->lock
TYPE_LOCK (struct io_ring_ctx)->uring_lock

io_uring/openclose.c io_pipe_prep() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 7
LOCK2 &ctx->uring_lock
HALF_LOCKED2 &sqd->lock
TYPE_LOCK (struct io_ring_ctx)->uring_lock

drivers/vhost/vdpa.c vhost_vdpa_pa_map() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
RX_PATH
TASK_NOT_RUNNING
LOCK2 &dev->mm->mmap_lock
LOCK2 &dev->mutex
HALF_LOCKED2 &pool->lock
TYPE_LOCK (struct mm_struct)->mmap_lock
TYPE_LOCK (struct vhost_dev)->mutex

net/core/skbuff.c mm_account_pinned_pages() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
CAPABLE 0 14
RX_PATH
TASK_NOT_RUNNING

drivers/android/binder.c binder_set_nice() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 13
TASK_NOT_RUNNING

fs/read_write.c generic_write_check_limits() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 1
RX_PATH
TASK_NOT_RUNNING

arch/x86/kvm/svm/sev.c sev_check_pin_count() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
LOCK2 _T->lock

mm/vma.c acct_stack_growth() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 3
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
LOCK2 &vma->anon_vma->root->rwsem
HALF_LOCKED2 &mm->mmap_lock
TYPE_LOCK (struct anon_vma)->rwsem

drivers/infiniband/core/umem.c __ib_umem_get_va() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &context->db_page_mutex

drivers/accel/amdxdna/amdxdna_ubuf.c amdxdna_get_ubuf() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8

io_uring/net.c io_accept_prep() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 7
LOCK2 &ctx->uring_lock
HALF_LOCKED2 &sqd->lock
TYPE_LOCK (struct io_ring_ctx)->uring_lock

io_uring/net.c io_socket_prep() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 7
LOCK2 &ctx->uring_lock
HALF_LOCKED2 &sqd->lock
TYPE_LOCK (struct io_ring_ctx)->uring_lock

kernel/acct.c do_acct_process() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 1
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 global &system_transition_mutex

kernel/events/core.c perf_mmap_calc_limits() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
RX_PATH
TASK_NOT_RUNNING
LOCK2 _T->lock
HALF_LOCKED2 &ipcp->lock

drivers/vdpa/vdpa_user/vduse_dev.c vduse_dev_reg_umem() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
LOCK2 &dev->domain_lock
TYPE_LOCK (struct vduse_dev)->domain_lock

kernel/user_namespace.c create_user_ns() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 12
RX_PATH
TASK_NOT_RUNNING

kernel/user_namespace.c create_user_ns() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 11
RX_PATH
TASK_NOT_RUNNING

kernel/user_namespace.c create_user_ns() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
RX_PATH
TASK_NOT_RUNNING

kernel/user_namespace.c enforced_nproc_rlimit() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 6
RX_PATH
TASK_NOT_RUNNING

drivers/vfio/vfio_iommu_type1.c vfio_iommu_replay() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
LOCK2 &container->group_lock
LOCK2 &iommu->lock
HALF_LOCKED2 &group->group_lock
HALF_LOCKED2 global &vfio.iommu_drivers_lock
TYPE_LOCK (struct vfio_container)->group_lock
TYPE_LOCK (struct vfio_iommu)->lock

drivers/vfio/vfio_iommu_type1.c vfio_pin_map_dma() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
CAPABLE 0 14
LOCK2 &iommu->lock
TYPE_LOCK (struct vfio_iommu)->lock

drivers/infiniband/hw/usnic/usnic_uiom.c usnic_uiom_get_pages() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
RX_PATH
TASK_NOT_RUNNING
LOCK2 &mm->mmap_lock
TYPE_LOCK (struct mm_struct)->mmap_lock

fs/select.c do_sys_poll() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 7

kernel/sys.c flag_nproc_exceeded() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 6

kernel/sys.c validate_prctl_map_addr() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 2
PREEMPT_ADD
HALF_LOCKED2 &mm->arg_lock
HALF_LOCKED2 &mm->mmap_lock

fs/zonefs/file.c zonefs_write_check_limits() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 1
RX_PATH
TASK_NOT_RUNNING
LOCK2 &inode->i_rwsem
HALF_LOCKED2 &pool->lock
TYPE_LOCK (struct inode)->i_rwsem

drivers/infiniband/hw/hfi1/user_pages.c hfi1_can_pin_pages() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
CAPABLE 0 14
RX_PATH
TASK_NOT_RUNNING
HALF_LOCKED2 &fd->pq_srcu

mm/mlock.c __do_sys_mlockall() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8

mm/mlock.c __do_sys_mlockall() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8

mm/mlock.c can_do_mlock() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
RX_PATH
TASK_NOT_RUNNING

mm/mlock.c do_mlock() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8

mm/mlock.c user_shm_lock() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
PREEMPT_ADD
RX_PATH
HALF_LOCKED2 &ids->rwsem
HALF_LOCKED2 &shp->shm_perm.lock
HALF_LOCKED2 rcu_read

ipc/shm.c shmctl_do_lock() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
NS_CAPABLE 0 14
PREEMPT_ADD <- disables preempt
LOCK2 &shp->shm_perm.lock
LOCK2 rcu_read
TYPE_LOCK (struct kern_ipc_perm)->lock

security/selinux/hooks.c selinux_bprm_committing_creds() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 0

fs/exec.c do_execveat_common() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 6

net/xdp/xdp_umem.c xdp_umem_account_pages() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 8
CAPABLE 0 14
RX_PATH
TASK_NOT_RUNNING
LOCK2 &xs->mutex
TYPE_LOCK (struct xdp_sock)->mutex

ipc/mqueue.c mqueue_get_inode() -> rlimit()

Type Parameter Key Value
PARAM_VALUE 0 limit 12
CAPABLE 0 24
PREEMPT_ADD <- disables preempt
RX_PATH
TASK_NOT_RUNNING
LOCK2 global &mq_lock