[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202601211136.rAqSN4rF-lkp@intel.com>
Date: Wed, 21 Jan 2026 11:23:06 +0800
From: kernel test robot <lkp@...el.com>
To: Marco Elver <elver@...gle.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, x86@...nel.org,
Peter Zijlstra <peterz@...radead.org>
Subject: [tip:locking/core 20/43] include/linux/rmap.h:123:1:
warning: rw_semaphore 'anon_vma->root->rwsem' is still held at the end of
function
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head: ccf9e070116a81d29aae30db501d562c8efd1ed8
commit: e4fd3be884cf33a42c5bcde087b0722a5b8f25ca [20/43] locking/rwsem: Support Clang's context analysis
config: s390-randconfig-002-20260121 (https://download.01.org/0day-ci/archive/20260121/202601211136.rAqSN4rF-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260121/202601211136.rAqSN4rF-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601211136.rAqSN4rF-lkp@intel.com/
All warnings (new ones prefixed by >>):
include/linux/fs.h:1083:1: warning: rw_semaphore 'mapping->invalidate_lock' is still held at the end of function [-Wthread-safety-analysis]
1083 | }
| ^
include/linux/fs.h:1082:2: note: rw_semaphore acquired here
1082 | down_write(&mapping->invalidate_lock);
| ^
include/linux/fs.h:1087:2: warning: releasing rw_semaphore 'mapping->invalidate_lock' that was not held [-Wthread-safety-analysis]
1087 | up_write(&mapping->invalidate_lock);
| ^
include/linux/fs.h:1093:1: warning: rw_semaphore 'mapping->invalidate_lock' is still held at the end of function [-Wthread-safety-analysis]
1093 | }
| ^
include/linux/fs.h:1092:2: note: rw_semaphore acquired here
1092 | down_read(&mapping->invalidate_lock);
| ^
include/linux/fs.h:1104:2: warning: releasing rw_semaphore 'mapping->invalidate_lock' that was not held [-Wthread-safety-analysis]
1104 | up_read(&mapping->invalidate_lock);
| ^
In file included from mm/pagewalk.c:2:
In file included from include/linux/pagewalk.h:5:
include/linux/mm.h:3436:1: warning: spinlock 'pmd_lockptr(mm, pmd)' is still held at the end of function [-Wthread-safety-analysis]
3436 | }
| ^
include/linux/mm.h:3434:2: note: spinlock acquired here
3434 | spin_lock(ptl);
| ^
include/linux/mm.h:3465:1: warning: spinlock 'pud_lockptr(mm, pud)' is still held at the end of function [-Wthread-safety-analysis]
3465 | }
| ^
include/linux/mm.h:3463:2: note: spinlock acquired here
3463 | spin_lock(ptl);
| ^
In file included from mm/pagewalk.c:5:
include/linux/hugetlb.h:1316:1: warning: spinlock 'huge_pte_lockptr(h, mm, pte)' is still held at the end of function [-Wthread-safety-analysis]
1316 | }
| ^
include/linux/hugetlb.h:1314:2: note: spinlock acquired here
1314 | spin_lock(ptl);
| ^
In file included from mm/pagewalk.c:7:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:23:
In file included from include/linux/writeback.h:13:
In file included from include/linux/blk_types.h:11:
include/linux/device.h:896:1: warning: mutex 'dev->mutex' is still held at the end of function [-Wthread-safety-analysis]
896 | }
| ^
include/linux/device.h:895:2: note: mutex acquired here
895 | mutex_lock(&dev->mutex);
| ^
include/linux/mutex.h:194:26: note: expanded from macro 'mutex_lock'
194 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
| ^
In file included from mm/pagewalk.c:7:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:23:
In file included from include/linux/writeback.h:13:
In file included from include/linux/blk_types.h:11:
include/linux/device.h:910:2: warning: releasing mutex 'dev->mutex' that was not held [-Wthread-safety-analysis]
910 | mutex_unlock(&dev->mutex);
| ^
In file included from mm/pagewalk.c:7:
In file included from include/linux/swap.h:9:
include/linux/memcontrol.h:1243:1: warning: spinlock 'folio_pgdat(folio).__lruvec.lru_lock' is still held at the end of function [-Wthread-safety-analysis]
1243 | }
| ^
include/linux/memcontrol.h:1241:2: note: spinlock acquired here
1241 | spin_lock(&pgdat->__lruvec.lru_lock);
| ^
include/linux/memcontrol.h:1251:1: warning: spinlock 'folio_pgdat(folio).__lruvec.lru_lock' is still held at the end of function [-Wthread-safety-analysis]
1251 | }
| ^
include/linux/memcontrol.h:1249:2: note: spinlock acquired here
1249 | spin_lock_irq(&pgdat->__lruvec.lru_lock);
| ^
include/linux/memcontrol.h:1260:1: warning: spinlock 'folio_pgdat(folio).__lruvec.lru_lock' is still held at the end of function [-Wthread-safety-analysis]
1260 | }
| ^
include/linux/memcontrol.h:1258:2: note: spinlock acquired here
1258 | spin_lock_irqsave(&pgdat->__lruvec.lru_lock, *flagsp);
| ^
include/linux/spinlock.h:391:35: note: expanded from macro 'spin_lock_irqsave'
391 | __release(spinlock_check(lock)); __acquire(lock); \
| ^
include/linux/compiler-context-analysis.h:360:24: note: expanded from macro '__acquire'
360 | # define __acquire(x) __acquire_ctx_lock(x)
| ^
In file included from mm/pagewalk.c:7:
In file included from include/linux/swap.h:9:
include/linux/memcontrol.h:1470:2: warning: releasing spinlock 'lruvec->lru_lock' that was not held [-Wthread-safety-analysis]
1470 | spin_unlock(&lruvec->lru_lock);
| ^
include/linux/memcontrol.h:1475:2: warning: releasing spinlock 'lruvec->lru_lock' that was not held [-Wthread-safety-analysis]
1475 | spin_unlock_irq(&lruvec->lru_lock);
| ^
include/linux/memcontrol.h:1481:2: warning: releasing spinlock 'lruvec->lru_lock' that was not held [-Wthread-safety-analysis]
1481 | spin_unlock_irqrestore(&lruvec->lru_lock, flags);
| ^
In file included from mm/pagewalk.c:12:
In file included from mm/internal.h:16:
>> include/linux/rmap.h:123:1: warning: rw_semaphore 'anon_vma->root->rwsem' is still held at the end of function [-Wthread-safety-analysis]
123 | }
| ^
include/linux/rmap.h:122:2: note: rw_semaphore acquired here
122 | down_write(&anon_vma->root->rwsem);
| ^
>> include/linux/rmap.h:132:2: warning: releasing rw_semaphore 'anon_vma->root->rwsem' that was not held [-Wthread-safety-analysis]
132 | up_write(&anon_vma->root->rwsem);
| ^
include/linux/rmap.h:138:1: warning: rw_semaphore 'anon_vma->root->rwsem' is still held at the end of function [-Wthread-safety-analysis]
138 | }
| ^
include/linux/rmap.h:137:2: note: rw_semaphore acquired here
137 | down_read(&anon_vma->root->rwsem);
| ^
include/linux/rmap.h:147:2: warning: releasing rw_semaphore 'anon_vma->root->rwsem' that was not held [-Wthread-safety-analysis]
147 | up_read(&anon_vma->root->rwsem);
| ^
include/linux/rmap.h:181:1: warning: __context_bitlock '((#undefined * 8) - 1) + folio->....._mm_ids' is still held at the end of function [-Wthread-safety-analysis]
181 | }
| ^
include/linux/rmap.h:180:2: note: __context_bitlock acquired here
180 | bit_spin_lock(FOLIO_MM_IDS_LOCK_BITNUM, &folio->_mm_ids);
| ^
include/linux/rmap.h:185:2: warning: releasing __context_bitlock '((#undefined * 8) - 1) + folio->....._mm_ids' that was not held [-Wthread-safety-analysis]
185 | __bit_spin_unlock(FOLIO_MM_IDS_LOCK_BITNUM, &folio->_mm_ids);
| ^
include/linux/rmap.h:958:3: warning: releasing spinlock 'pvmw->ptl' that was not held [-Wthread-safety-analysis]
958 | spin_unlock(pvmw->ptl);
| ^
include/linux/rmap.h:976:3: warning: releasing spinlock 'pvmw->ptl' that was not held [-Wthread-safety-analysis]
976 | spin_unlock(pvmw->ptl);
| ^
mm/pagewalk.c:89:4: warning: releasing spinlock 'ptl' that was not held [-Wthread-safety-analysis]
89 | pte_unmap_unlock(pte, ptl);
| ^
include/linux/mm.h:3373:2: note: expanded from macro 'pte_unmap_unlock'
3373 | spin_unlock(ptl); \
| ^
mm/pagewalk.c:925:4: warning: releasing spinlock 'pud_lock(vma->vm_mm, pud_offset(p4d_offset(pgd_offset_raw(vma->vm_mm->.pgd, addr), addr), addr))' that was not held [-Wthread-safety-analysis]
925 | spin_unlock(ptl);
| ^
mm/pagewalk.c:928:4: warning: releasing spinlock 'pud_lock(vma->vm_mm, pud_offset(p4d_offset(pgd_offset_raw(vma->vm_mm->.pgd, addr), addr), addr))' that was not held [-Wthread-safety-analysis]
928 | spin_unlock(ptl);
| ^
mm/pagewalk.c:939:3: warning: releasing spinlock 'pud_lock(vma->vm_mm, pud_offset(p4d_offset(pgd_offset_raw(vma->vm_mm->.pgd, addr), addr), addr))' that was not held [-Wthread-safety-analysis]
939 | spin_unlock(ptl);
| ^
mm/pagewalk.c:960:4: warning: releasing spinlock 'pmd_lock(vma->vm_mm, pmd_offset(pud_offset(p4d_offset(pgd_offset_raw(vma->vm_mm->.pgd, addr), addr), addr), addr))' that was not held [-Wthread-safety-analysis]
960 | spin_unlock(ptl);
| ^
mm/pagewalk.c:963:4: warning: releasing spinlock 'pmd_lock(vma->vm_mm, pmd_offset(pud_offset(p4d_offset(pgd_offset_raw(vma->vm_mm->.pgd, addr), addr), addr), addr))' that was not held [-Wthread-safety-analysis]
963 | spin_unlock(ptl);
| ^
mm/pagewalk.c:983:3: warning: releasing spinlock 'pmd_lock(vma->vm_mm, pmd_offset(pud_offset(p4d_offset(pgd_offset_raw(vma->vm_mm->.pgd, addr), addr), addr), addr))' that was not held [-Wthread-safety-analysis]
983 | spin_unlock(ptl);
| ^
mm/pagewalk.c:1018:2: warning: releasing spinlock 'ptl' that was not held [-Wthread-safety-analysis]
1018 | pte_unmap_unlock(ptep, ptl);
| ^
include/linux/mm.h:3373:2: note: expanded from macro 'pte_unmap_unlock'
3373 | spin_unlock(ptl); \
| ^
56 warnings generated.
--
| ^
include/linux/fs.h:1093:1: warning: rw_semaphore 'mapping->invalidate_lock' is still held at the end of function [-Wthread-safety-analysis]
1093 | }
| ^
include/linux/fs.h:1092:2: note: rw_semaphore acquired here
1092 | down_read(&mapping->invalidate_lock);
| ^
include/linux/fs.h:1104:2: warning: releasing rw_semaphore 'mapping->invalidate_lock' that was not held [-Wthread-safety-analysis]
1104 | up_read(&mapping->invalidate_lock);
| ^
In file included from mm/sparse-vmemmap.c:21:
include/linux/mm.h:3436:1: warning: spinlock 'pmd_lockptr(mm, pmd)' is still held at the end of function [-Wthread-safety-analysis]
3436 | }
| ^
include/linux/mm.h:3434:2: note: spinlock acquired here
3434 | spin_lock(ptl);
| ^
include/linux/mm.h:3465:1: warning: spinlock 'pud_lockptr(mm, pud)' is still held at the end of function [-Wthread-safety-analysis]
3465 | }
| ^
include/linux/mm.h:3463:2: note: spinlock acquired here
3463 | spin_lock(ptl);
| ^
In file included from mm/sparse-vmemmap.c:35:
In file included from mm/hugetlb_vmemmap.h:11:
include/linux/hugetlb.h:1316:1: warning: spinlock 'huge_pte_lockptr(h, mm, pte)' is still held at the end of function [-Wthread-safety-analysis]
1316 | }
| ^
include/linux/hugetlb.h:1314:2: note: spinlock acquired here
1314 | spin_lock(ptl);
| ^
In file included from mm/sparse-vmemmap.c:43:
In file included from mm/internal.h:13:
In file included from include/linux/mm_inline.h:8:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:23:
In file included from include/linux/writeback.h:13:
In file included from include/linux/blk_types.h:11:
include/linux/device.h:896:1: warning: mutex 'dev->mutex' is still held at the end of function [-Wthread-safety-analysis]
896 | }
| ^
include/linux/device.h:895:2: note: mutex acquired here
895 | mutex_lock(&dev->mutex);
| ^
include/linux/mutex.h:194:26: note: expanded from macro 'mutex_lock'
194 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
| ^
In file included from mm/sparse-vmemmap.c:43:
In file included from mm/internal.h:13:
In file included from include/linux/mm_inline.h:8:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:23:
In file included from include/linux/writeback.h:13:
In file included from include/linux/blk_types.h:11:
include/linux/device.h:910:2: warning: releasing mutex 'dev->mutex' that was not held [-Wthread-safety-analysis]
910 | mutex_unlock(&dev->mutex);
| ^
In file included from mm/sparse-vmemmap.c:43:
In file included from mm/internal.h:13:
In file included from include/linux/mm_inline.h:8:
In file included from include/linux/swap.h:9:
include/linux/memcontrol.h:1243:1: warning: spinlock 'folio_pgdat(folio).__lruvec.lru_lock' is still held at the end of function [-Wthread-safety-analysis]
1243 | }
| ^
include/linux/memcontrol.h:1241:2: note: spinlock acquired here
1241 | spin_lock(&pgdat->__lruvec.lru_lock);
| ^
include/linux/memcontrol.h:1251:1: warning: spinlock 'folio_pgdat(folio).__lruvec.lru_lock' is still held at the end of function [-Wthread-safety-analysis]
1251 | }
| ^
include/linux/memcontrol.h:1249:2: note: spinlock acquired here
1249 | spin_lock_irq(&pgdat->__lruvec.lru_lock);
| ^
include/linux/memcontrol.h:1260:1: warning: spinlock 'folio_pgdat(folio).__lruvec.lru_lock' is still held at the end of function [-Wthread-safety-analysis]
1260 | }
| ^
include/linux/memcontrol.h:1258:2: note: spinlock acquired here
1258 | spin_lock_irqsave(&pgdat->__lruvec.lru_lock, *flagsp);
| ^
include/linux/spinlock.h:391:35: note: expanded from macro 'spin_lock_irqsave'
391 | __release(spinlock_check(lock)); __acquire(lock); \
| ^
include/linux/compiler-context-analysis.h:360:24: note: expanded from macro '__acquire'
360 | # define __acquire(x) __acquire_ctx_lock(x)
| ^
In file included from mm/sparse-vmemmap.c:43:
In file included from mm/internal.h:13:
In file included from include/linux/mm_inline.h:8:
In file included from include/linux/swap.h:9:
include/linux/memcontrol.h:1470:2: warning: releasing spinlock 'lruvec->lru_lock' that was not held [-Wthread-safety-analysis]
1470 | spin_unlock(&lruvec->lru_lock);
| ^
include/linux/memcontrol.h:1475:2: warning: releasing spinlock 'lruvec->lru_lock' that was not held [-Wthread-safety-analysis]
1475 | spin_unlock_irq(&lruvec->lru_lock);
| ^
include/linux/memcontrol.h:1481:2: warning: releasing spinlock 'lruvec->lru_lock' that was not held [-Wthread-safety-analysis]
1481 | spin_unlock_irqrestore(&lruvec->lru_lock, flags);
| ^
In file included from mm/sparse-vmemmap.c:43:
In file included from mm/internal.h:16:
>> include/linux/rmap.h:123:1: warning: rw_semaphore 'anon_vma->root->rwsem' is still held at the end of function [-Wthread-safety-analysis]
123 | }
| ^
include/linux/rmap.h:122:2: note: rw_semaphore acquired here
122 | down_write(&anon_vma->root->rwsem);
| ^
>> include/linux/rmap.h:132:2: warning: releasing rw_semaphore 'anon_vma->root->rwsem' that was not held [-Wthread-safety-analysis]
132 | up_write(&anon_vma->root->rwsem);
| ^
include/linux/rmap.h:138:1: warning: rw_semaphore 'anon_vma->root->rwsem' is still held at the end of function [-Wthread-safety-analysis]
138 | }
| ^
include/linux/rmap.h:137:2: note: rw_semaphore acquired here
137 | down_read(&anon_vma->root->rwsem);
| ^
include/linux/rmap.h:147:2: warning: releasing rw_semaphore 'anon_vma->root->rwsem' that was not held [-Wthread-safety-analysis]
147 | up_read(&anon_vma->root->rwsem);
| ^
include/linux/rmap.h:181:1: warning: __context_bitlock '((#undefined * 8) - 1) + folio->....._mm_ids' is still held at the end of function [-Wthread-safety-analysis]
181 | }
| ^
include/linux/rmap.h:180:2: note: __context_bitlock acquired here
180 | bit_spin_lock(FOLIO_MM_IDS_LOCK_BITNUM, &folio->_mm_ids);
| ^
include/linux/rmap.h:185:2: warning: releasing __context_bitlock '((#undefined * 8) - 1) + folio->....._mm_ids' that was not held [-Wthread-safety-analysis]
185 | __bit_spin_unlock(FOLIO_MM_IDS_LOCK_BITNUM, &folio->_mm_ids);
| ^
include/linux/rmap.h:958:3: warning: releasing spinlock 'pvmw->ptl' that was not held [-Wthread-safety-analysis]
958 | spin_unlock(pvmw->ptl);
| ^
include/linux/rmap.h:976:3: warning: releasing spinlock 'pvmw->ptl' that was not held [-Wthread-safety-analysis]
976 | spin_unlock(pvmw->ptl);
| ^
48 warnings generated.
--
| ^
include/linux/fs.h:1078:1: warning: rw_semaphore 'inode->i_rwsem' is still held at the end of function [-Wthread-safety-analysis]
1078 | }
| ^
include/linux/fs.h:1077:2: note: rw_semaphore acquired here
1077 | down_read_nested(&inode->i_rwsem, subclass);
| ^
include/linux/fs.h:1083:1: warning: rw_semaphore 'mapping->invalidate_lock' is still held at the end of function [-Wthread-safety-analysis]
1083 | }
| ^
include/linux/fs.h:1082:2: note: rw_semaphore acquired here
1082 | down_write(&mapping->invalidate_lock);
| ^
include/linux/fs.h:1087:2: warning: releasing rw_semaphore 'mapping->invalidate_lock' that was not held [-Wthread-safety-analysis]
1087 | up_write(&mapping->invalidate_lock);
| ^
include/linux/fs.h:1093:1: warning: rw_semaphore 'mapping->invalidate_lock' is still held at the end of function [-Wthread-safety-analysis]
1093 | }
| ^
include/linux/fs.h:1092:2: note: rw_semaphore acquired here
1092 | down_read(&mapping->invalidate_lock);
| ^
include/linux/fs.h:1104:2: warning: releasing rw_semaphore 'mapping->invalidate_lock' that was not held [-Wthread-safety-analysis]
1104 | up_read(&mapping->invalidate_lock);
| ^
In file included from mm/list_lru.c:9:
In file included from include/linux/module.h:20:
In file included from include/linux/elf.h:6:
In file included from arch/s390/include/asm/elf.h:173:
In file included from arch/s390/include/asm/mmu_context.h:11:
In file included from arch/s390/include/asm/pgalloc.h:18:
include/linux/mm.h:3436:1: warning: spinlock 'pmd_lockptr(mm, pmd)' is still held at the end of function [-Wthread-safety-analysis]
3436 | }
| ^
include/linux/mm.h:3434:2: note: spinlock acquired here
3434 | spin_lock(ptl);
| ^
include/linux/mm.h:3465:1: warning: spinlock 'pud_lockptr(mm, pud)' is still held at the end of function [-Wthread-safety-analysis]
3465 | }
| ^
include/linux/mm.h:3463:2: note: spinlock acquired here
3463 | spin_lock(ptl);
| ^
In file included from mm/list_lru.c:14:
In file included from include/linux/memcontrol.h:23:
In file included from include/linux/writeback.h:13:
In file included from include/linux/blk_types.h:11:
include/linux/device.h:896:1: warning: mutex 'dev->mutex' is still held at the end of function [-Wthread-safety-analysis]
896 | }
| ^
include/linux/device.h:895:2: note: mutex acquired here
895 | mutex_lock(&dev->mutex);
| ^
include/linux/mutex.h:194:26: note: expanded from macro 'mutex_lock'
194 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
| ^
In file included from mm/list_lru.c:14:
In file included from include/linux/memcontrol.h:23:
In file included from include/linux/writeback.h:13:
In file included from include/linux/blk_types.h:11:
include/linux/device.h:910:2: warning: releasing mutex 'dev->mutex' that was not held [-Wthread-safety-analysis]
910 | mutex_unlock(&dev->mutex);
| ^
In file included from mm/list_lru.c:14:
include/linux/memcontrol.h:1243:1: warning: spinlock 'folio_pgdat(folio).__lruvec.lru_lock' is still held at the end of function [-Wthread-safety-analysis]
1243 | }
| ^
include/linux/memcontrol.h:1241:2: note: spinlock acquired here
1241 | spin_lock(&pgdat->__lruvec.lru_lock);
| ^
include/linux/memcontrol.h:1251:1: warning: spinlock 'folio_pgdat(folio).__lruvec.lru_lock' is still held at the end of function [-Wthread-safety-analysis]
1251 | }
| ^
include/linux/memcontrol.h:1249:2: note: spinlock acquired here
1249 | spin_lock_irq(&pgdat->__lruvec.lru_lock);
| ^
include/linux/memcontrol.h:1260:1: warning: spinlock 'folio_pgdat(folio).__lruvec.lru_lock' is still held at the end of function [-Wthread-safety-analysis]
1260 | }
| ^
include/linux/memcontrol.h:1258:2: note: spinlock acquired here
1258 | spin_lock_irqsave(&pgdat->__lruvec.lru_lock, *flagsp);
| ^
include/linux/spinlock.h:391:35: note: expanded from macro 'spin_lock_irqsave'
391 | __release(spinlock_check(lock)); __acquire(lock); \
| ^
include/linux/compiler-context-analysis.h:360:24: note: expanded from macro '__acquire'
360 | # define __acquire(x) __acquire_ctx_lock(x)
| ^
In file included from mm/list_lru.c:14:
include/linux/memcontrol.h:1470:2: warning: releasing spinlock 'lruvec->lru_lock' that was not held [-Wthread-safety-analysis]
1470 | spin_unlock(&lruvec->lru_lock);
| ^
include/linux/memcontrol.h:1475:2: warning: releasing spinlock 'lruvec->lru_lock' that was not held [-Wthread-safety-analysis]
1475 | spin_unlock_irq(&lruvec->lru_lock);
| ^
include/linux/memcontrol.h:1481:2: warning: releasing spinlock 'lruvec->lru_lock' that was not held [-Wthread-safety-analysis]
1481 | spin_unlock_irqrestore(&lruvec->lru_lock, flags);
| ^
In file included from mm/list_lru.c:16:
In file included from mm/internal.h:16:
>> include/linux/rmap.h:123:1: warning: rw_semaphore 'anon_vma->root->rwsem' is still held at the end of function [-Wthread-safety-analysis]
123 | }
| ^
include/linux/rmap.h:122:2: note: rw_semaphore acquired here
122 | down_write(&anon_vma->root->rwsem);
| ^
>> include/linux/rmap.h:132:2: warning: releasing rw_semaphore 'anon_vma->root->rwsem' that was not held [-Wthread-safety-analysis]
132 | up_write(&anon_vma->root->rwsem);
| ^
include/linux/rmap.h:138:1: warning: rw_semaphore 'anon_vma->root->rwsem' is still held at the end of function [-Wthread-safety-analysis]
138 | }
| ^
include/linux/rmap.h:137:2: note: rw_semaphore acquired here
137 | down_read(&anon_vma->root->rwsem);
| ^
include/linux/rmap.h:147:2: warning: releasing rw_semaphore 'anon_vma->root->rwsem' that was not held [-Wthread-safety-analysis]
147 | up_read(&anon_vma->root->rwsem);
| ^
include/linux/rmap.h:181:1: warning: __context_bitlock '((#undefined * 8) - 1) + folio->....._mm_ids' is still held at the end of function [-Wthread-safety-analysis]
181 | }
| ^
include/linux/rmap.h:180:2: note: __context_bitlock acquired here
180 | bit_spin_lock(FOLIO_MM_IDS_LOCK_BITNUM, &folio->_mm_ids);
| ^
include/linux/rmap.h:185:2: warning: releasing __context_bitlock '((#undefined * 8) - 1) + folio->....._mm_ids' that was not held [-Wthread-safety-analysis]
185 | __bit_spin_unlock(FOLIO_MM_IDS_LOCK_BITNUM, &folio->_mm_ids);
| ^
include/linux/rmap.h:958:3: warning: releasing spinlock 'pvmw->ptl' that was not held [-Wthread-safety-analysis]
958 | spin_unlock(pvmw->ptl);
| ^
include/linux/rmap.h:976:3: warning: releasing spinlock 'pvmw->ptl' that was not held [-Wthread-safety-analysis]
976 | spin_unlock(pvmw->ptl);
| ^
mm/list_lru.c:149:1: warning: spinlock 'lru->node[nid].lru.lock' is still held at the end of function [-Wthread-safety-analysis]
149 | }
| ^
mm/list_lru.c:146:3: note: spinlock acquired here
146 | spin_lock(&l->lock);
| ^
mm/list_lru.c:154:3: warning: releasing spinlock 'l->lock' that was not held [-Wthread-safety-analysis]
154 | spin_unlock_irq(&l->lock);
| ^
mm/list_lru.c:156:3: warning: releasing spinlock 'l->lock' that was not held [-Wthread-safety-analysis]
156 | spin_unlock(&l->lock);
| ^
50 warnings generated.
..
vim +123 include/linux/rmap.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 119
4fc3f1d66b1ef0 Ingo Molnar 2012-12-02 120 static inline void anon_vma_lock_write(struct anon_vma *anon_vma)
cba48b98f2348c Rik van Riel 2010-08-09 121 {
5a505085f043e8 Ingo Molnar 2012-12-02 122 down_write(&anon_vma->root->rwsem);
cba48b98f2348c Rik van Riel 2010-08-09 @123 }
cba48b98f2348c Rik van Riel 2010-08-09 124
adef440691bab8 Andrea Arcangeli 2023-12-06 125 static inline int anon_vma_trylock_write(struct anon_vma *anon_vma)
adef440691bab8 Andrea Arcangeli 2023-12-06 126 {
adef440691bab8 Andrea Arcangeli 2023-12-06 127 return down_write_trylock(&anon_vma->root->rwsem);
adef440691bab8 Andrea Arcangeli 2023-12-06 128 }
adef440691bab8 Andrea Arcangeli 2023-12-06 129
08b52706d50565 Konstantin Khlebnikov 2013-02-22 130 static inline void anon_vma_unlock_write(struct anon_vma *anon_vma)
cba48b98f2348c Rik van Riel 2010-08-09 131 {
5a505085f043e8 Ingo Molnar 2012-12-02 @132 up_write(&anon_vma->root->rwsem);
cba48b98f2348c Rik van Riel 2010-08-09 133 }
cba48b98f2348c Rik van Riel 2010-08-09 134
:::::: The code at line 123 was first introduced by commit
:::::: cba48b98f2348c814316c4b4f411a07a0e4a2bf9 mm: change direct call of spin_lock(anon_vma->lock) to inline function
:::::: TO: Rik van Riel <riel@...hat.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists