lkml.org 
[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 14/30] x86/xen: Add missing annotation for xen_pte_lock()
Date
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@gmail.com>
---
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
\
 
 \ /
  Last update: 2020-02-14 21:49    [W:0.122 / U:12.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site