Lock warning cleanup
Subsystems (21)
PATCH 3/30 mm/memcontrol: Add missing annotation for unlock_page_lru()
In reply to Jules IrengeSparse reports warning at unlock_page_lry()
warning: context imbalance in unlock_page_lru() - unexpected unlock
The root cause is the missing annotation at unlock_page_lru() Add the missing __releases(&pgdat->lru_lock)
--- mm/memcontrol.c | 1 + 1 file changed, 1 insertion(+)
mm/memcontrol.c +1 -0
@@ -2587,6 +2587,7 @@ static void lock_page_lru(struct page *page, int *isolated) }static void unlock_page_lru (struct page *page,int isolated) + __releases(&pgdat->lru_lock) {pg_data_t *pgdat =page_pgdat (page);
Signature · 1 line
2.24.1
PATCH 4/30 mm/memcontrol: Add missing annotation for lock_page_lru()
In reply to a message not in the archiveSparse reports warning at lock_page_lry()
warning: context imbalance in lock_page_lru() - wrong count at exit
The root cause is the missing annotation at lock_page_lru() Add the missing __acquires(&pgdat->lru_lock)
--- mm/memcontrol.c | 1 + 1 file changed, 1 insertion(+)
mm/memcontrol.c +1 -0
@@ -2571,6 +2571,7 @@ static void cancel_charge(struct mem_cgroup *memcg, unsigned int nr_pages) }static void lock_page_lru (struct page *page,int *isolated) + __acquires(&pgdat->lru_lock) {pg_data_t *pgdat =page_pgdat (page);
Signature · 1 line
2.24.1
cover Lock warning cleanup
This patch series adds missing annotations to various functions that register warnings of context imbalance when built with Sparse tool. The adds fix the warnings and give better insight or directive on what the function are actually doing.
Jules Irenge (30):
x86/apic/vector: Add missing annotation to lock_vector_lock(void) x86/apic/vector: Add missing annotation to lock_vector_lock(void) mm/memcontrol: Add missing annotation for unlock_page_lru() mm/memcontrol: Add missing annotation for lock_page_lru() mm/compaction: Add missing annotation for compact_lock_irqsave mm/hugetlb: Add missing annotation for gather_surplus_pages() mm/mempolicy: Add missing annotation for queue_pages_pmd() mm/slub: Add missing annotation for get_map()
mm/slub: Add missing annotation for put_map() mm/zsmalloc: Add missing annotation for migrate_read_lock() mm/zsmalloc: Add missing annotation for migrate_read_unlock() mm/zsmalloc: Add missing annotation for pin_tag() mm/zsmalloc: Add missing annotation for unpin_tag() x86/xen: Add missing annotation for xen_pte_lock() x86/xen: Add missing annotation for xen_pte_unlock() drm/vkms: Add missing annotation for vkms_crtc_atomic_begin() drm/vkms: Add missing annotation for vkms_crtc_atomic_flush() driver core: Add missing annotation for device_links_write_lock() driver core: Add missing annotation for device_links_read_lock()
pcnet32: Add missing annotation for pcnet32_suspend()
sfc: Add missing annotation for efx_ef10_try_update_nic_stats_vf()
xhci: Add missing annotation for xhci_set_port_power()
xhci: Add missing annotation for xhci_enter_test_mode
tipc: Add missing annotation for tipc_node_read_lock()
tipc: Add missing annotation for tipc_node_read_unlock()
tipc: Add missing annotation for tipc_node_write_lock()
tipc: Add missing annotation for tipc_node_write_unlock_fast()
tipc: Add missing annotation for tipc_node_write_unlock()
net: Add missing annotation for netlink_walk_start()
net: Add missing annotation for netlink_walk_stop()
arch/x86/kernel/apic/vector.c | 4 ++-- arch/x86/xen/mmu_pv.c | 3 ++- drivers/base/core.c | 4 ++-- drivers/gpu/drm/vkms/vkms_crtc.c | 2 ++ drivers/net/ethernet/amd/pcnet32.c | 2 +- drivers/net/ethernet/sfc/ef10.c | 1 + drivers/usb/host/xhci-hub.c | 2 ++ mm/compaction.c | 1 + mm/hugetlb.c | 1 + mm/memcontrol.c | 2 ++ mm/mempolicy.c | 1 + mm/slub.c | 3 ++- mm/zsmalloc.c | 8 ++++---- net/netlink/af_netlink.c | 4 ++-- net/tipc/node.c | 9 +++++---- 15 files changed, 30 insertions(+), 17 deletions(-)
Signature · 1 line
2.24.1
PATCH 1/30 x86/apic/vector: Add missing annotation to lock_vector_lock(void)
Sparse reports a warning at lock_vector_lock(void)
warning: context imbalance in lock_vector_lock() - wrong count at exit
The root cause is the missing annotation at lock_vector_lock(void) Add the missing __acquires(&vector_lock) annotation
--- arch/x86/kernel/apic/vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/apic/vector.c +1 -1
@@ -47,7 +47,7 @@ static struct irq_matrix *vector_matrix; static DEFINE_PER_CPU(struct hlist_head, cleanup_list);#endif -void lock_vector_lock (void ) +void lock_vector_lock(void) __acquires(&vector_lock) {/* Used to the online set of cpus does not change * during assign_irq_vector.
Signature · 1 line
2.24.1
PATCH 2/30 x86/apic/vector: Add missing annotation to lock_vector_lock(void)
In reply to Jules IrengeSparse reports a warning at unlock_vector_lock()
warning: context imbalance in unlock_vector_lock() - unexpected unlock
The root cause is the missing annotation at unlock_vector_lock() Add the missing __releases(&vector_lock) annotation
--- arch/x86/kernel/apic/vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/apic/vector.c +1 -1
@@ -55,7 +55,7 @@ void lock_vector_lock(void) __acquires(&vector_lock)raw_spin_lock (&vector_lock); } -void unlock_vector_lock (void ) +void unlock_vector_lock(void) __releases(&vector_lock) {raw_spin_unlock (&vector_lock); }
Signature · 1 line
2.24.1
PATCH 5/30 mm/compaction: Add missing annotation for compact_lock_irqsave
In reply to Jules IrengeSparse reports a warning at compact_lock_irqsave()
warning: context imbalance in compact_lock_irqsave() - wrong count at exit
The root cause is the missing annotation at compact_lock_irqsave() Add the missing __acquires(lock) annotation.
--- mm/compaction.c | 1 + 1 file changed, 1 insertion(+)
mm/compaction.c +1 -0
@@ -481,6 +481,7 @@ static bool test_and_set_skip(struct compact_control *cc, struct page *page,*/ static bool compact_lock_irqsave (spinlock_t *lock,unsigned long *flags,struct compact_control *cc) +__acquires (lock) {/* Track if the lock is contended in async mode */ if (cc->mode ==MIGRATE_ASYNC && !cc->contended) {
Signature · 1 line
2.24.1
PATCH 6/30 mm/hugetlb: Add missing annotation for gather_surplus_pages()
In reply to Jules IrengeSparse reports a warning at gather_surplus_pages()
warning: context imbalance in hugetlb_cow() - unexpected unlock
The root cause is the missing annotation at gather_surplus_pages() Add the missing __must_hold(&hugetlb_lock)
--- mm/hugetlb.c | 1 + 1 file changed, 1 insertion(+)
mm/hugetlb.c +1 -0
@@ -1695,6 +1695,7 @@ struct page *alloc_huge_page_vma(struct hstate *h, struct vm_area_struct *vma,* of size 'delta'. */ static int gather_surplus_pages (struct hstate *h,int delta) + __must_hold(&hugetlb_lock) {struct list_head surplus_list;struct page *page, *tmp;
Signature · 1 line
2.24.1
PATCH 7/30 mm/mempolicy: Add missing annotation for queue_pages_pmd()
In reply to Jules IrengeSparse reports a warning at queue_pages_pmd()
context imbalance in queue_pages_pmd() - unexpected unlock
The root cause is the missing annotation at queue_pages_pmd() Add the missing __releases(ptl)
--- mm/mempolicy.c | 1 + 1 file changed, 1 insertion(+)
mm/mempolicy.c +1 -0
@@ -442,6 +442,7 @@ static inline bool queue_pages_required(struct page *page,*/ static int queue_pages_pmd (pmd_t *pmd,spinlock_t *ptl,unsigned long addr,unsigned long end,struct mm_walk *walk) +__releases (ptl) {int ret =0 ;struct page *page;
Signature · 1 line
2.24.1
PATCH 8/30 mm/slub: Add missing annotation for get_map()
In reply to Jules IrengeSparse reports a warning at get_map()()
warning: context imbalance in get_map() - wrong count at exit
The root cause is the missing annotation at get_map() Add the missing __acquires(&object_map_lock) annotation
--- mm/slub.c | 1 + 1 file changed, 1 insertion(+)
mm/slub.c +1 -0
@@ -449,6 +449,7 @@ static DEFINE_SPINLOCK(object_map_lock);* not vanish from under us. */ static unsigned long *get_map (struct kmem_cache *s,struct page *page) + __acquires(&object_map_lock) {void *p;void *addr =page_address (page);
Signature · 1 line
2.24.1
PATCH 9/30 mm/slub: Add missing annotation for put_map()
In reply to Jules IrengeSparse reports a warning at put_map()()
warning: context imbalance in put_map() - unexpected unlock
The root cause is the missing annotation at put_map() Add the missing __releases(&object_map_lock) annotation
--- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/slub.c +1 -1
@@ -466,7 +466,7 @@ static unsigned long *get_map(struct kmem_cache *s, struct page *page)return object_map; } -static void put_map (unsigned long *map) +static void put_map(unsigned long *map) __releases(&object_map_lock) {VM_BUG_ON (map != object_map);lockdep_assert_held (&object_map_lock);
Signature · 1 line
2.24.1
PATCH 10/30 mm/zsmalloc: Add missing annotation for migrate_read_lock()
In reply to Jules IrengeSparse reports a warning at migrate_read_lock()()
warning: context imbalance in migrate_read_lock() - wrong count at exit
The root cause is the missing annotation at migrate_read_lock() Add the missing __acquires(&zspage->lock) annotation
--- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/zsmalloc.c +1 -1
@@ -1833,7 +1833,7 @@ static void migrate_lock_init(struct zspage *zspage)rwlock_init (&zspage->lock); } -static void migrate_read_lock (struct zspage *zspage) +static void migrate_read_lock(struct zspage *zspage) __acquires(&zspage->lock) {read_lock (&zspage->lock); }
Signature · 1 line
2.24.1
PATCH 11/30 mm/zsmalloc: Add missing annotation for migrate_read_unlock()
In reply to Jules IrengeSparse reports a warning at migrate_read_unlock()()
warning: context imbalance in migrate_read_unlock() - unexpected unlock
The root cause is the missing annotation at migrate_read_unlock() Add the missing __releases(&zspage->lock) annotation
--- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/zsmalloc.c +1 -1
@@ -1838,7 +1838,7 @@ static void migrate_read_lock(struct zspage *zspage) __acquires(&zspage->lock)read_lock (&zspage->lock); } -static void migrate_read_unlock (struct zspage *zspage) +static void migrate_read_unlock(struct zspage *zspage) __releases(&zspage->lock) {read_unlock (&zspage->lock); }
Signature · 1 line
2.24.1
PATCH 12/30 mm/zsmalloc: Add missing annotation for pin_tag()
In reply to Jules IrengeSparse reports a warning at pin_tag()()
warning: context imbalance in pin_tag() - wrong count at exit
The root cause is the missing annotation at pin_tag() Add the missing __acquires(bitlock) annotation
--- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/zsmalloc.c +1 -1
@@ -891,7 +891,7 @@ static inline int trypin_tag(unsigned long handle)return bit_spin_trylock (HANDLE_PIN_BIT , (unsigned long *)handle); } -static void pin_tag (unsigned long handle) +static void pin_tag (unsigned long handle)__acquires (bitlock) {bit_spin_lock (HANDLE_PIN_BIT , (unsigned long *)handle); }
Signature · 1 line
2.24.1
PATCH 13/30 mm/zsmalloc: Add missing annotation for unpin_tag()
In reply to Jules IrengeSparse reports a warning at unpin_tag()()
warning: context imbalance in unpin_tag() - unexpected unlock
The root cause is the missing annotation at unpin_tag() Add the missing __releases(bitlock) annotation
--- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/zsmalloc.c +1 -1
@@ -896,7 +896,7 @@ static void pin_tag(unsigned long handle) __acquires(bitlock)bit_spin_lock (HANDLE_PIN_BIT , (unsigned long *)handle); } -static void unpin_tag (unsigned long handle) +static void unpin_tag (unsigned long handle)__releases (bitlock) {bit_spin_unlock (HANDLE_PIN_BIT , (unsigned long *)handle); }
Signature · 1 line
2.24.1
PATCH 14/30 x86/xen: Add missing annotation for xen_pte_lock()
In reply to Jules IrengeSparse reports warning at xen_pte_lock()
warning: context imbalance in xen_pte_lock() - wrong count at exit
The root cause is the missing annotation at xen_pte_lock() Add the missing __acquires(ptl) annotation
--- arch/x86/xen/mmu_pv.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/xen/mmu_pv.c +1 -0
@@ -695,6 +695,7 @@ static int xen_pgd_walk(struct mm_struct *mm,/* If we're using split pte locks, then take the page's lock and return a pointer to it. Otherwise return NULL. */ static spinlock_t *xen_pte_lock (struct page *page,struct mm_struct *mm) +__acquires (ptl) {spinlock_t *ptl =NULL ;
Signature · 1 line
2.24.1
PATCH 21/30 sfc: Add missing annotation for efx_ef10_try_update_nic_stats_vf()
In reply to Jules IrengeSparse reports a warning at efx_ef10_try_update_nic_stats_vf()
warning: context imbalance in efx_ef10_try_update_nic_stats_vf()
- unexpected unlock
The root cause is the missing annotation at efx_ef10_try_update_nic_stats_vf()
Add the missing __must_hold(&efx->stats_lock) annotattion
--- drivers/net/ethernet/sfc/ef10.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/sfc/ef10.c +1 -0
@@ -1820,6 +1820,7 @@ static size_t efx_ef10_update_stats_pf(struct efx_nic *efx, u64 *full_stats, }static int efx_ef10_try_update_nic_stats_vf (struct efx_nic *efx) + __must_hold(&efx->stats_lock) {MCDI_DECLARE_BUF (inbuf,MC_CMD_MAC_STATS_IN_LEN );struct efx_ef10_nic_data *nic_data = efx->nic_data;
Signature · 1 line
2.24.1
PATCH 16/30 drm/vkms: Add missing annotation for vkms_crtc_atomic_begin()
In reply to Jules IrengeSparse reports a warning at vkms_crtc_atomic_begin()
warning: context imbalance in vkms_crtc_atomic_begin()
- wrong count at exit
The root cause is the missing annotation at vkms_crtc_atomic_begin() Add the missing __acquires(&vkms_output->lock) annotation
--- drivers/gpu/drm/vkms/vkms_crtc.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/vkms/vkms_crtc.c +1 -0
@@ -219,6 +219,7 @@ static void vkms_crtc_atomic_disable(struct drm_crtc *crtc,static void vkms_crtc_atomic_begin (struct drm_crtc *crtc,struct drm_crtc_state *old_crtc_state) + __acquires(&vkms_output->lock) {struct vkms_output *vkms_output =drm_crtc_to_vkms_output (crtc);
Signature · 1 line
2.24.1
PATCH 19/30 driver core: Add missing annotation for device_links_read_lock()
In reply to Jules IrengeSparse reports a warning at device_links_read_unlock()
warning: warning: context imbalance in device_links_read_unlock()
- unexpected unlock
The root cause is the missing annotation at device_links_read_unlock() Add the missing __releases(&device_links_srcu) annotation
--- drivers/base/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/core.c +1 -1
@@ -69,7 +69,7 @@ int device_links_read_lock(void) __acquires(&device_links_srcu)return srcu_read_lock (&device_links_srcu); } -void device_links_read_unlock (int idx) +void device_links_read_unlock(int idx) __releases(&device_links_srcu) {srcu_read_unlock (&device_links_srcu, idx); }
Signature · 1 line
2.24.1
PATCH 25/30 tipc: Add missing annotation for tipc_node_read_unlock()
In reply to Jules IrengeSparse reports a warning at tipc_node_read_unlock()
warning: context imbalance in tipc_node_read_unlock - unexpected unlock
The root cause is the missing annotation at tipc_node_read_unlock() Add the missing __releases(&n->lock) annotation
--- net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/node.c +1 -1
@@ -356,7 +356,7 @@ static void tipc_node_read_lock(struct tipc_node *n) __acquires(&n->lock)read_lock_bh (&n->lock); } -static void tipc_node_read_unlock (struct tipc_node *n) +static void tipc_node_read_unlock(struct tipc_node *n) __releases(&n->lock) {read_unlock_bh (&n->lock); }
Signature · 1 line
2.24.1
PATCH 27/30 tipc: Add missing annotation for tipc_node_write_unlock_fast()
In reply to Jules IrengeSparse reports a warning at tipc_node_write_unlock_fast()
warning: context imbalance in tipc_node_write_unlock_fast
- unexpected unlock
The root cause is the missing annotation at tipc_node_write_unlock_fast() Add the missing __releases(&n->lock) annotation
--- net/tipc/node.c | 1 + 1 file changed, 1 insertion(+)
net/tipc/node.c +1 -0
@@ -367,6 +367,7 @@ static void tipc_node_write_lock(struct tipc_node *n) __acquires(&n->lock) }static void tipc_node_write_unlock_fast (struct tipc_node *n) + __releases(&n->lock) {write_unlock_bh (&n->lock); }
Signature · 1 line
2.24.1
PATCH 30/30 net: Add missing annotation for netlink_walk_stop()
In reply to Jules IrengeSparse reports a warning at netlink_walk_stop()
warning: context imbalance in netlink_walk_stop()
- unexpected unlock
The root cause is the missing annotation at netlink_walk_stop() A close look at rhashtable_walk_stop()
shows that an __releases(RCU) is needed here
Add the missing __releases(RCU) annotation
--- net/netlink/af_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netlink/af_netlink.c +1 -1
@@ -2545,7 +2545,7 @@ static void netlink_walk_start(struct nl_seq_iter *iter) __acquires(RCU)rhashtable_walk_start (&iter->hti); } -static void netlink_walk_stop (struct nl_seq_iter *iter) +static void netlink_walk_stop (struct nl_seq_iter *iter)__releases (RCU ) {rhashtable_walk_stop (&iter->hti);rhashtable_walk_exit (&iter->hti);
Signature · 1 line
2.24.1
PATCH 29/30 net: Add missing annotation for netlink_walk_start()
In reply to Jules IrengeSparse reports a warning at netlink_walk_start()
warning: context imbalance in netlink_walk_start()
- wrong count at exit
The root cause is the missing annotation at netlink_walk_start() A close look at rhashtable_walk_start_check()
shows that an __acquires(RCU) is needed here.
Add the missing __acquires(RCU) annotation
--- net/netlink/af_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netlink/af_netlink.c +1 -1
@@ -2539,7 +2539,7 @@ struct nl_seq_iter {int link; }; -static void netlink_walk_start (struct nl_seq_iter *iter) +static void netlink_walk_start (struct nl_seq_iter *iter)__acquires (RCU ) {rhashtable_walk_enter (&nl_table[iter->link].hash, &iter->hti);rhashtable_walk_start (&iter->hti);
Signature · 1 line
2.24.1
PATCH 28/30 tipc: Add missing annotation for tipc_node_write_unlock()
In reply to Jules IrengeSparse reports a warning at tipc_node_write_unlock()
warning: context imbalance in tipc_node_write_unlock
- unexpected unlock
The root cause is the missing annotation at tipc_node_write_unlock() Add the missing __releases(&n->lock) annotation
--- net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/node.c +1 -1
@@ -372,7 +372,7 @@ static void tipc_node_write_unlock_fast(struct tipc_node *n)write_unlock_bh (&n->lock); } -static void tipc_node_write_unlock (struct tipc_node *n) +static void tipc_node_write_unlock(struct tipc_node *n) __releases(&n->lock) {struct net *net = n->net;u32 addr =0 ;
Signature · 1 line
2.24.1
PATCH 18/30 driver core: Add missing annotation for device_links_write_lock()
In reply to Jules IrengeSparse reports a warning at device_links_write_lock()
warning: context imbalance in evice_links_write_lock()
- wrong count at exit
The root cause is the missing annotation at device_links_write_lock() Add the missing __acquires(&device_links_srcu) annotation
--- drivers/base/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/core.c +1 -1
@@ -64,7 +64,7 @@ static inline void device_links_write_unlock(void)mutex_unlock (&device_links_lock); } -int device_links_read_lock (void ) +int device_links_read_lock(void) __acquires(&device_links_srcu) {return srcu_read_lock (&device_links_srcu); }
Signature · 1 line
2.24.1
PATCH 17/30 drm/vkms: Add missing annotation for vkms_crtc_atomic_flush()
In reply to Jules IrengeSparse reports a warning at vkms_crtc_atomic_flush()
warning: context imbalance in vkms_crtc_atomic_flush()
- unexpected unlock
The root cause is the missing annotation at vkms_crtc_atomic_flush() Add the missing __releases(&vkms_output->lock) annotation
--- drivers/gpu/drm/vkms/vkms_crtc.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/vkms/vkms_crtc.c +1 -0
@@ -231,6 +231,7 @@ static void vkms_crtc_atomic_begin(struct drm_crtc *crtc,static void vkms_crtc_atomic_flush (struct drm_crtc *crtc,struct drm_crtc_state *old_crtc_state) + __releases(&vkms_output->lock) {struct vkms_output *vkms_output =drm_crtc_to_vkms_output (crtc);
Signature · 1 line
2.24.1
PATCH 26/30 tipc: Add missing annotation for tipc_node_write_lock()
In reply to Jules IrengeSparse reports a warning at tipc_node_write_lock()
warning: context imbalance in tipc_node_write_lock - wrong count at exit
The root cause is the missing annotation at tipc_node_write_lock() Add the missing __acquires(&n->lock) annotation
--- net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/node.c +1 -1
@@ -361,7 +361,7 @@ static void tipc_node_read_unlock(struct tipc_node *n) __releases(&n->lock)read_unlock_bh (&n->lock); } -static void tipc_node_write_lock (struct tipc_node *n) +static void tipc_node_write_lock(struct tipc_node *n) __acquires(&n->lock) {write_lock_bh (&n->lock); }
Signature · 1 line
2.24.1
PATCH 24/30 tipc: Add missing annotation for tipc_node_read_lock()
In reply to Jules IrengeSparse reports a warning at tipc_node_read_lock()
warning: context imbalance in tipc_node_read_lock - wrong count at exit
The root cause is the missing annotation at tipc_node_read_lock() Add the missing __acquires(&n->lock) annotattion
--- net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/node.c +1 -1
@@ -351,7 +351,7 @@ static struct tipc_node *tipc_node_find_by_id(struct net *net, u8 *id)return found ? n :NULL ; } -static void tipc_node_read_lock (struct tipc_node *n) +static void tipc_node_read_lock(struct tipc_node *n) __acquires(&n->lock) {read_lock_bh (&n->lock); }
Signature · 1 line
2.24.1
PATCH 15/30 x86/xen: Add missing annotation for xen_pte_unlock()
In reply to Jules IrengeSparse reports warning at xen_pte_unlock()
warning: context imbalance in xen_pte_unlock() - unexpected unlock
The root cause is the missing annotation at xen_pte_unlock() Add the missing __releases(ptl) annotation
--- arch/x86/xen/mmu_pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/xen/mmu_pv.c +1 -1
@@ -707,7 +707,7 @@ static spinlock_t *xen_pte_lock(struct page *page, struct mm_struct *mm)return ptl; } -static void xen_pte_unlock (void *v) +static void xen_pte_unlock (void *v)__releases (ptl) {spinlock_t *ptl = v;spin_unlock (ptl);
Signature · 1 line
2.24.1
PATCH 23/30 xhci: Add missing annotation for xhci_enter_test_mode
In reply to Jules IrengeSparse reports a warning at xhci_enter_test_mode()
warning: context imbalance in xhci_enter_test_mode - unexpected unlock
The root cause is the missing annotation at xhci_enter_test_mode() Add the missing __must_hold(&xhci->lock) annotattion
--- drivers/usb/host/xhci-hub.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/host/xhci-hub.c +1 -0
@@ -609,6 +609,7 @@ static void xhci_port_set_test_mode(struct xhci_hcd *xhci,static int xhci_enter_test_mode (struct xhci_hcd *xhci,u16 test_mode,u16 wIndex,unsigned long *flags) + __must_hold(&xhci->lock) {int i, retval;
Signature · 1 line
2.24.1
PATCH 22/30 xhci: Add missing annotation for xhci_set_port_power()
In reply to Jules IrengeSparse reports a warning at xhci_set_port_power()
warning: context imbalance in xhci_set_port_power - unexpected unlock
The root cause is the missing annotation at xhci_set_port_power() Add the missing __must_hold(&xhci->lock) annotattion
--- drivers/usb/host/xhci-hub.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/host/xhci-hub.c +1 -0
@@ -558,6 +558,7 @@ struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd)*/ static void xhci_set_port_power (struct xhci_hcd *xhci,struct usb_hcd *hcd,u16 index,bool on,unsigned long *flags) + __must_hold(&xhci->lock) {struct xhci_hub *rhub;struct xhci_port *port;
Signature · 1 line
2.24.1
PATCH 20/30 pcnet32: Add missing annotation for pcnet32_suspend()
In reply to Jules IrengeSparse reports a warning at pcnet32_suspend()
warning: context imbalance in pcnet32_suspend() - unexpected unlock
The root cause is the missing annotation at pcnet32_suspend() Add the missing __must_hold(&lp->lock) annotattion
--- drivers/net/ethernet/amd/pcnet32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/amd/pcnet32.c +1 -1
@@ -684,7 +684,7 @@ static void pcnet32_poll_controller(struct net_device *dev)* lp->lock must be held. */ static int pcnet32_suspend (struct net_device *dev,unsigned long *flags, -int can_sleep) + int can_sleep) __must_hold(&lp->lock) {int csr5;struct pcnet32_private *lp =netdev_priv (dev);
Signature · 1 line
2.24.1
Re: [Xen-devel] [PATCH 14/30] x86/xen: Add missing annotation for xen_pte_lock()
In reply to Jules IrengeQuoted 8 lines · Jules Irenge
Sparse reports warning at
xen_pte_lock()warning: context imbalance in
xen_pte_lock()- wrong count at exitThe root cause is the missing annotation at
xen_pte_lock()Add the missing__acquires(ptl)annotationSigned-off-by Jules Irenge <[email protected]>
although I'd prefer this and the next patch to be merged into a single one.
Re: [PATCH 06/30] mm/hugetlb: Add missing annotation for gather_surplus_pages()
In reply to Jules IrengeQuoted 8 lines · Jules Irenge
Sparse reports a warning at
gather_surplus_pages()warning: context imbalance in
hugetlb_cow()- unexpected unlockThe root cause is the missing annotation at
gather_surplus_pages()Add the missing__must_hold(&hugetlb_lock)Signed-off-by Jules Irenge <[email protected]>
Signature · 1 line
Mike Kravetz
Re: [Xen-devel] [PATCH 14/30] x86/xen: Add missing annotation for xen_pte_lock()
In reply to Boris OstrovskyThanks for the feedback. I will send the merged version then if it s fine with you.
Regards,
Jules
Quoted 18 lines · Boris Ostrovsky
Quoted 8 lines · Jules Irenge
Sparse reports warning at
xen_pte_lock()warning: context imbalance in
xen_pte_lock()- wrong count at exitThe root cause is the missing annotation at
xen_pte_lock()Add the missing__acquires(ptl)annotationSigned-off-by Jules Irenge <[email protected]>Reviewed-by Boris Ostrovsky <[email protected]>although I'd prefer this and the next patch to be merged into a single one.
Re: [PATCH 21/30] sfc: Add missing annotation for efx_ef10_try_update_nic_stats_vf()
In reply to Jules IrengeQuoted 10 lines · Jules Irenge
Sparse reports a warning at
efx_ef10_try_update_nic_stats_vf()warning: context imbalance in
efx_ef10_try_update_nic_stats_vf()
- unexpected unlockThe root cause is the missing annotation at
efx_ef10_try_update_nic_stats_vf()
Add the missing__must_hold(&efx->stats_lock)annotattionSigned-off-by Jules Irenge <[email protected]>
Thanks
Quoted 17 lines
--- drivers/net/ethernet/sfc/ef10.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/sfc/ef10.c +1
-0@@ -1820,6 +1820,7 @@ static size_t efx_ef10_update_stats_pf(struct efx_nic *efx, u64 *full_stats, }static int efx_ef10_try_update_nic_stats_vf (struct efx_nic *efx) + __must_hold(&efx->stats_lock) {MCDI_DECLARE_BUF (inbuf,MC_CMD_MAC_STATS_IN_LEN );struct efx_ef10_nic_data *nic_data = efx->nic_data;
Re: [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock()
In reply to Jules IrengeQuoted 8 lines · Jules Irenge
Sparse reports a warning at migrate_read_lock()()
warning: context imbalance in
migrate_read_lock()- wrong count at exitThe root cause is the missing annotation at
migrate_read_lock()Add the missing__acquires(&zspage->lock)annotationSigned-off-by Jules Irenge <[email protected]>
Re: [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock()
In reply to Jules IrengeQuoted 8 lines · Jules Irenge
Sparse reports a warning at migrate_read_lock()()
warning: context imbalance in
migrate_read_lock()- wrong count at exitThe root cause is the missing annotation at
migrate_read_lock()Add the missing__acquires(&zspage->lock)annotationSigned-off-by Jules Irenge <[email protected]>
Re: [PATCH 12/30] mm/zsmalloc: Add missing annotation for pin_tag()
In reply to Jules IrengeQuoted 8 lines · Jules Irenge
Sparse reports a warning at pin_tag()()
warning: context imbalance in
pin_tag()- wrong count at exitThe root cause is the missing annotation at
pin_tag()Add the missing__acquires(bitlock)annotationSigned-off-by Jules Irenge <[email protected]>
Re: [PATCH 13/30] mm/zsmalloc: Add missing annotation for unpin_tag()
In reply to Jules IrengeQuoted 8 lines · Jules Irenge
Sparse reports a warning at unpin_tag()()
warning: context imbalance in
unpin_tag()- unexpected unlockThe root cause is the missing annotation at
unpin_tag()Add the missing__releases(bitlock)annotationSigned-off-by Jules Irenge <[email protected]>
Re: [PATCH 11/30] mm/zsmalloc: Add missing annotation for migrate_read_unlock()
In reply to Jules IrengeQuoted 8 lines · Jules Irenge
Sparse reports a warning at migrate_read_unlock()()
warning: context imbalance in
migrate_read_unlock()- unexpected unlockThe root cause is the missing annotation at
migrate_read_unlock()Add the missing__releases(&zspage->lock)annotationSigned-off-by Jules Irenge <[email protected]>