Defined in 2 files as a function:
- include/linux/fs.h, line 516 (as a function)
- tools/testing/vma/include/stubs.h, line 139 (as a function)
Referenced in 11 files:
- drivers/dma-buf/dma-resv.c, line 800
- fs/hugetlbfs/inode.c
- fs/proc/task_mmu.c
- mm/hugetlb.c
- mm/internal.h, line 1563
- mm/memory-failure.c, line 1612
- mm/migrate.c, line 1556
- mm/mmap.c, line 1815
- mm/mremap.c, line 156
- mm/nommu.c
- mm/vma.c
Smatch caller information:
mm/mmap.c dup_mmap() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap.rb_root.rb_node | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | &mm->mmap_lock | ||
| LOCK2 | &oldmm->mmap_lock | ||
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem | ||
| TYPE_LOCK | (struct mm_struct)->mmap_lock |
fs/proc/task_mmu.c pagemap_scan_hugetlb_entry() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| PREEMPT_ADD | <- disables preempt | ||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| HALF_LOCKED2 | &m->lock | ||
| HALF_LOCKED2 | &mapping->i_mmap_rwsem | ||
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem |
fs/proc/task_mmu.c pagemap_scan_hugetlb_hole_wp() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| PREEMPT_ADD | <- disables preempt | ||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem |
mm/util.c maybe_rmap_unlock_action() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL |
mm/hugetlb.c __hugetlb_zap_end() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->invalidate_lock.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | mapping->invalidate_lock.first_waiter->type | 0-1 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| NO_OVERFLOW_SIMPLE | 0 | mapping->host->i_size |
mm/hugetlb.c hugetlb_change_protection() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2212933610777083904,2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2212933610777083904,2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| NO_OVERFLOW_SIMPLE | 0 | mapping->host->i_bytes | |
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| HALF_LOCKED2 | &dst_mm->mmap_lock | ||
| HALF_LOCKED2 | &mm->mmap_lock | ||
| HALF_LOCKED2 | _T->lock | ||
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem |
mm/hugetlb.c hugetlb_unshare_pmds() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->host->i_sb->s_export_op->encode_fh | 0,2,1398972869330624512,1616549510479982592,2037984473558433792,2776440803454029824,3228746867770966016,3502492669594062848,3526768263295340544,3559173554394271744,5000850239487131648,5583386343686406144,5817357685191483392-s64max |
| PARAM_VALUE | 0 | mapping->host->i_sb->s_export_op->fh_to_dentry | 0,8684,447817974243774464,687732489194512384,742201802719268864,868497899885588480,1471448175530500096,2021658383390310400,2445877819203563520,2512819722689847296,2649270699546726400,2761259683714371584,2893332316235677696-s64max |
| PARAM_VALUE | 0 | mapping->host->i_sb->s_export_op->fh_to_parent | 0,5297,148606482432692224,436469935444291584,467281172929331200,529780027764285440,1092893949038768128,1556959531105513472,1608953577475584000,1649536479961075712,2404761408063094784,2970908329832960000,3511613614414655488-s64max |
| PARAM_VALUE | 0 | mapping->host->i_sb->s_export_op->get_parent | 0,8931,264940071972966400,291591359766798336,565128213429456896,893189740598853632,1241177127089143808,1474696885321834496,1812477326828269568,1893665921928286208,2210088671756947456,2437012291923775488,2483979068402987008-s64max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| RX_PATH | |||
| NOCHECK_CALL | |||
| LOCK2 | &mm->mmap_lock | ||
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem | ||
| TYPE_LOCK | (struct mm_struct)->mmap_lock |
mm/hugetlb.c move_hugetlb_page_tables() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| NOCHECK_CALL | |||
| LOCK2 | &mm->mmap_lock | ||
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| HALF_LOCKED2 | &tsk->signal->exec_update_lock | ||
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem | ||
| TYPE_LOCK | (struct mm_struct)->mmap_lock |
mm/hugetlb.c unmap_ref_private() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| HALF_LOCKED2 | &mm->mmap_lock | ||
| HALF_LOCKED2 | &pool->lock | ||
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem |
mm/mremap.c drop_rmap_locks() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| NOCHECK_CALL | |||
| LOCK2 | &mm->mmap_lock | ||
| HALF_LOCKED2 | &tsk->signal->exec_update_lock | ||
| TYPE_LOCK | (struct mm_struct)->mmap_lock |
mm/vma.c unlink_file_vma_batch_process() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap.rb_leftmost | 0,4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap.rb_leftmost->rb_left | 0 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| CAPPED_DATA | 0 | mapping | 1 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| HALF_LOCKED2 | &mm->mmap_lock | ||
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem |
mm/vma.c vm_unlock_mapping() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| DATA_SOURCE | 0 | mapping | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | global &mm_all_locks_mutex | ||
| HALF_LOCKED2 | &cli->mutex | ||
| HALF_LOCKED2 | &mm->mmap_lock |
mm/vma.c vma_complete() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping->i_mmap.rb_leftmost | 0,4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| HALF_LOCKED2 | &mm->mmap_lock | ||
| HALF_LOCKED2 | &tsk->signal->exec_update_lock |
mm/vma.c vma_link_file() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap.rb_leftmost | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap.rb_leftmost->rb_left | 0 |
| PARAM_VALUE | 0 | mapping->i_mmap.rb_leftmost->rb_right | 0 |
| PARAM_VALUE | 0 | mapping->i_mmap.rb_root.rb_node | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem |
drivers/dma-buf/dma-resv.c dma_resv_lockdep() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 382248882946588672 |
| PARAM_VALUE | 0 | mapping->a_ops | 0 |
| PARAM_VALUE | 0 | mapping->flags | 0 |
| PARAM_VALUE | 0 | mapping->gfp_mask | 0 |
| PARAM_VALUE | 0 | mapping->host | 0 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| PARAM_VALUE | 0 | mapping->i_pages.xa_flags | 33 |
| PARAM_VALUE | 0 | mapping->nrpages | 0 |
| PARAM_VALUE | 0 | mapping->wb_err | 0 |
| MEM_ZERO | 0 | mapping | |
| NOCHECK_CALL | |||
| LOCK2 | &mapping.i_mmap_rwsem | ||
| LOCK2 | &mm->mmap_lock | ||
| HALF_LOCKED2 | &obj | ||
| HALF_LOCKED2 | &obj.lock | ||
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem | ||
| TYPE_LOCK | (struct mm_struct)->mmap_lock |
mm/memory-failure.c unmap_poisoned_folio() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| BUF_SIZE | 0 | mapping | (-1),552 |
| BUF_SIZE | 0 | mapping | (-1),552 |
| DATA_SOURCE | 0 | mapping | r hugetlb_folio_mapping_lock_write |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| NO_OVERFLOW_SIMPLE | 0 | mapping->host->i_size | |
| HALF_LOCKED2 | &dev->mutex | ||
| HALF_LOCKED2 | global &mf_mutex | ||
| HALF_LOCKED2 | global &pcp_batch_high_lock |
fs/hugetlbfs/inode.c hugetlb_unmap_file_folio() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| BUF_SIZE | 0 | mapping | 552 |
| DATA_SOURCE | 0 | mapping | $1 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| HALF_LOCKED2 | &inode->i_rwsem | ||
| HALF_LOCKED2 | &resv_map->rw_sema | ||
| HALF_LOCKED2 | &vma->vm_private_data->rw_sema | ||
| HALF_LOCKED2 | &vma_lock->rw_sema | ||
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem |
fs/hugetlbfs/inode.c hugetlb_vmtruncate() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| HALF_LOCKED2 | &dentry->d_inode->i_rwsem | ||
| HALF_LOCKED2 | &dentry->d_lockref.lock | ||
| HALF_LOCKED2 | &inode->i_rwsem | ||
| HALF_LOCKED2 | &pool->lock | ||
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem |
fs/hugetlbfs/inode.c hugetlbfs_punch_hole() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 4096-ptr_max |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.next | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->list.prev | 2624917664208203776 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | mapping->i_mmap_rwsem.osq.tail.counter | 0-s32max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| LOCK2 | &inode->i_rwsem | ||
| LOCK2 | 0 | &mapping->i_mmap_rwsem | |
| HALF_LOCKED2 | &pool->lock | ||
| TYPE_LOCK | (struct address_space)->i_mmap_rwsem | ||
| TYPE_LOCK | (struct inode)->i_rwsem |
mm/migrate.c unmap_and_move_hugetlb_folio() -> i_mmap_unlock_write()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | mapping | 0,4096-ptr_max |
| BUF_SIZE | 0 | mapping | (-1)-0,552 |
| BUF_SIZE | 0 | mapping | (-1)-0,552 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| HALF_LOCKED2 | &ctx->walk_control_lock | ||
| HALF_LOCKED2 | &dev->mutex | ||
| HALF_LOCKED2 | global &mf_mutex | ||
| HALF_LOCKED2 | global &pcp_batch_high_lock |