[PATCH 14/30] x86/xen: Add missing annotation for xen_pte_lock()
From: Jules Irenge
Date: Fri Feb 14 2020 - 15:50:10 EST
Sparse 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
Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
arch/x86/xen/mmu_pv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c
index bbba8b17829a..352f0c80cfcf 100644
--- a/arch/x86/xen/mmu_pv.c
+++ b/arch/x86/xen/mmu_pv.c
@@ -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;
--
2.24.1