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 15/30] x86/xen: Add missing annotation for xen_pte_unlock()
Date
Sparse 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

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
arch/x86/xen/mmu_pv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c
index 352f0c80cfcf..777008f8c668 100644
--- a/arch/x86/xen/mmu_pv.c
+++ b/arch/x86/xen/mmu_pv.c
@@ -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);
--
2.24.1
\
 
 \ /
  Last update: 2020-02-14 21:49    [W:0.096 / U:8.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site