linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 03/30] mm/memcontrol: Add missing annotation for unlock_page_lru()
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-14 20:47   ` [PATCH 04/30] mm/memcontrol: Add missing annotation for lock_page_lru() Jules Irenge
                     ` (9 subsequent siblings)
  10 siblings, 0 replies; 21+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Johannes Weiner, Michal Hocko,
	Vladimir Davydov, Andrew Morton,
	open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG),
	open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)

Sparse 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)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 mm/memcontrol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6f6dc8712e39..22ddd557a69b 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -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);
 
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 04/30] mm/memcontrol: Add missing annotation for lock_page_lru()
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
  2020-02-14 20:47   ` [PATCH 03/30] mm/memcontrol: Add missing annotation for unlock_page_lru() Jules Irenge
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-14 20:47   ` [PATCH 05/30] mm/compaction: Add missing annotation for compact_lock_irqsave Jules Irenge
                     ` (8 subsequent siblings)
  10 siblings, 0 replies; 21+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Johannes Weiner, Michal Hocko,
	Vladimir Davydov, Andrew Morton,
	open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG),
	open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)

Sparse 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)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 mm/memcontrol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 22ddd557a69b..67dc9f1af0bf 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -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);
 
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 05/30] mm/compaction: Add missing annotation for compact_lock_irqsave
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
  2020-02-14 20:47   ` [PATCH 03/30] mm/memcontrol: Add missing annotation for unlock_page_lru() Jules Irenge
  2020-02-14 20:47   ` [PATCH 04/30] mm/memcontrol: Add missing annotation for lock_page_lru() Jules Irenge
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-14 20:47   ` [PATCH 06/30] mm/hugetlb: Add missing annotation for gather_surplus_pages() Jules Irenge
                     ` (7 subsequent siblings)
  10 siblings, 0 replies; 21+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Andrew Morton, open list:MEMORY MANAGEMENT

Sparse 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.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 mm/compaction.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/compaction.c b/mm/compaction.c
index 672d3c78c6ab..81190fe22200 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -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) {
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 06/30] mm/hugetlb: Add missing annotation for gather_surplus_pages()
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
                     ` (2 preceding siblings ...)
  2020-02-14 20:47   ` [PATCH 05/30] mm/compaction: Add missing annotation for compact_lock_irqsave Jules Irenge
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-14 23:40     ` Mike Kravetz
  2020-02-14 20:47   ` [PATCH 07/30] mm/mempolicy: Add missing annotation for queue_pages_pmd() Jules Irenge
                     ` (6 subsequent siblings)
  10 siblings, 1 reply; 21+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Mike Kravetz, Andrew Morton,
	open list:HUGETLB FILESYSTEM

Sparse 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)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 mm/hugetlb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index dd8737a94bec..ff7dda27b33f 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -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;
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 07/30] mm/mempolicy: Add missing annotation for queue_pages_pmd()
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
                     ` (3 preceding siblings ...)
  2020-02-14 20:47   ` [PATCH 06/30] mm/hugetlb: Add missing annotation for gather_surplus_pages() Jules Irenge
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-14 20:47   ` [PATCH 08/30] mm/slub: Add missing annotation for get_map() Jules Irenge
                     ` (5 subsequent siblings)
  10 siblings, 0 replies; 21+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Andrew Morton, open list:MEMORY MANAGEMENT

Sparse 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)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 mm/mempolicy.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 977c641f78cf..bb0755228150 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -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;
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 08/30] mm/slub: Add missing annotation for get_map()
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
                     ` (4 preceding siblings ...)
  2020-02-14 20:47   ` [PATCH 07/30] mm/mempolicy: Add missing annotation for queue_pages_pmd() Jules Irenge
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-14 20:47   ` [PATCH 09/30] mm/slub: Add missing annotation for put_map() Jules Irenge
                     ` (4 subsequent siblings)
  10 siblings, 0 replies; 21+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Christoph Lameter, Pekka Enberg,
	David Rientjes, Joonsoo Kim, Andrew Morton,
	open list:SLAB ALLOCATOR

Sparse 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

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 mm/slub.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/slub.c b/mm/slub.c
index 17dc00e33115..3c6d348afcf9 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -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);
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 09/30] mm/slub: Add missing annotation for put_map()
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
                     ` (5 preceding siblings ...)
  2020-02-14 20:47   ` [PATCH 08/30] mm/slub: Add missing annotation for get_map() Jules Irenge
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-14 20:47   ` [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock() Jules Irenge
                     ` (3 subsequent siblings)
  10 siblings, 0 replies; 21+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Christoph Lameter, Pekka Enberg,
	David Rientjes, Joonsoo Kim, Andrew Morton,
	open list:SLAB ALLOCATOR

Sparse 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

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

diff --git a/mm/slub.c b/mm/slub.c
index 3c6d348afcf9..c273d0f32b8f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -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);
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock()
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
                     ` (6 preceding siblings ...)
  2020-02-14 20:47   ` [PATCH 09/30] mm/slub: Add missing annotation for put_map() Jules Irenge
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-27 21:52     ` Minchan Kim
  2020-02-27 21:52     ` Minchan Kim
  2020-02-14 20:47   ` [PATCH 11/30] mm/zsmalloc: Add missing annotation for migrate_read_unlock() Jules Irenge
                     ` (2 subsequent siblings)
  10 siblings, 2 replies; 21+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Minchan Kim, Nitin Gupta,
	Sergey Senozhatsky, Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

Sparse 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

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

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 22d17ecfe7df..da70817b4ed8 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -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);
 }
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 11/30] mm/zsmalloc: Add missing annotation for migrate_read_unlock()
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
                     ` (7 preceding siblings ...)
  2020-02-14 20:47   ` [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock() Jules Irenge
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-27 21:54     ` Minchan Kim
  2020-02-14 20:47   ` [PATCH 12/30] mm/zsmalloc: Add missing annotation for pin_tag() Jules Irenge
  2020-02-14 20:47   ` [PATCH 13/30] mm/zsmalloc: Add missing annotation for unpin_tag() Jules Irenge
  10 siblings, 1 reply; 21+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Minchan Kim, Nitin Gupta,
	Sergey Senozhatsky, Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

Sparse 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

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

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index da70817b4ed8..2eab424c8c67 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -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);
 }
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 12/30] mm/zsmalloc: Add missing annotation for pin_tag()
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
                     ` (8 preceding siblings ...)
  2020-02-14 20:47   ` [PATCH 11/30] mm/zsmalloc: Add missing annotation for migrate_read_unlock() Jules Irenge
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-27 21:53     ` Minchan Kim
  2020-02-14 20:47   ` [PATCH 13/30] mm/zsmalloc: Add missing annotation for unpin_tag() Jules Irenge
  10 siblings, 1 reply; 21+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Minchan Kim, Nitin Gupta,
	Sergey Senozhatsky, Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

Sparse 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

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

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 2eab424c8c67..7bac76ae11b3 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -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);
 }
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 13/30] mm/zsmalloc: Add missing annotation for unpin_tag()
       [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
                     ` (9 preceding siblings ...)
  2020-02-14 20:47   ` [PATCH 12/30] mm/zsmalloc: Add missing annotation for pin_tag() Jules Irenge
@ 2020-02-14 20:47   ` Jules Irenge
  2020-02-27 21:53     ` Minchan Kim
  10 siblings, 1 reply; 21+ messages in thread
From: Jules Irenge @ 2020-02-14 20:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Jules Irenge, Minchan Kim, Nitin Gupta,
	Sergey Senozhatsky, Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

Sparse 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

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

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 7bac76ae11b3..2aa2d524a343 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -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);
 }
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 06/30] mm/hugetlb: Add missing annotation for gather_surplus_pages()
  2020-02-14 20:47   ` [PATCH 06/30] mm/hugetlb: Add missing annotation for gather_surplus_pages() Jules Irenge
@ 2020-02-14 23:40     ` Mike Kravetz
  0 siblings, 0 replies; 21+ messages in thread
From: Mike Kravetz @ 2020-02-14 23:40 UTC (permalink / raw)
  To: Jules Irenge, linux-kernel; +Cc: boqun.feng, Andrew Morton, HUGETLB FILESYSTEM

On 2/14/20 12:47 PM, Jules Irenge wrote:
> Sparse 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)
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>

Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
-- 
Mike Kravetz


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 17/30] mm/zsmalloc: Add missing annotation for zs_map_object()
       [not found] ` <20200223231711.157699-1-jbi.octave@gmail.com>
@ 2020-02-23 23:16   ` Jules Irenge
  2020-02-23 23:16   ` [PATCH 18/30] mm/zsmalloc: Add missing annotation for zs_unmap_object() Jules Irenge
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 21+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
  To: boqun.feng
  Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
	Sergey Senozhatsky, Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

Sparse reports a warning at zs_map_object()
context imbalance in zs_map_object() - wrong count at exit
The root cause is the missing annotation at zs_map_object()
Add the missing __acquires(zspage)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 mm/zsmalloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 2aa2d524a343..9d3f9b3d22aa 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1290,6 +1290,7 @@ EXPORT_SYMBOL_GPL(zs_get_total_pages);
  */
 void *zs_map_object(struct zs_pool *pool, unsigned long handle,
 			enum zs_mapmode mm)
+	__acquires(zspage)
 {
 	struct zspage *zspage;
 	struct page *page;
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 18/30] mm/zsmalloc: Add missing annotation for zs_unmap_object()
       [not found] ` <20200223231711.157699-1-jbi.octave@gmail.com>
  2020-02-23 23:16   ` [PATCH 17/30] mm/zsmalloc: Add missing annotation for zs_map_object() Jules Irenge
@ 2020-02-23 23:16   ` Jules Irenge
  2020-02-23 23:17   ` [PATCH 19/30] mm/zsmalloc: Add missing annotation for migrate_write_lock() Jules Irenge
  2020-02-23 23:17   ` [PATCH 20/30] mm/zsmalloc: Add missing annotation for migrate_write_unlock() Jules Irenge
  3 siblings, 0 replies; 21+ messages in thread
From: Jules Irenge @ 2020-02-23 23:16 UTC (permalink / raw)
  To: boqun.feng
  Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
	Sergey Senozhatsky, Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

Sparse reports a warning at zs_unmap_object()
context imbalance in zs_unmap_object() - unexpected unlock
The root cause is the missing annotation at zs_unmap_object()
Add the missing __releases(zspage)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 mm/zsmalloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 9d3f9b3d22aa..10a96651cb97 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1349,6 +1349,7 @@ void *zs_map_object(struct zs_pool *pool, unsigned long handle,
 EXPORT_SYMBOL_GPL(zs_map_object);
 
 void zs_unmap_object(struct zs_pool *pool, unsigned long handle)
+	__releases(zspage)
 {
 	struct zspage *zspage;
 	struct page *page;
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 19/30] mm/zsmalloc: Add missing annotation for migrate_write_lock()
       [not found] ` <20200223231711.157699-1-jbi.octave@gmail.com>
  2020-02-23 23:16   ` [PATCH 17/30] mm/zsmalloc: Add missing annotation for zs_map_object() Jules Irenge
  2020-02-23 23:16   ` [PATCH 18/30] mm/zsmalloc: Add missing annotation for zs_unmap_object() Jules Irenge
@ 2020-02-23 23:17   ` Jules Irenge
  2020-02-23 23:17   ` [PATCH 20/30] mm/zsmalloc: Add missing annotation for migrate_write_unlock() Jules Irenge
  3 siblings, 0 replies; 21+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
  To: boqun.feng
  Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
	Sergey Senozhatsky, Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

Sparse reports a warning at migrate_write_lock()
warning: context imbalance in migrate_write_lock() - wrong count at exit
The root cause is the missing annotation at migrate_write_lock()
Add the missing __acquires(&zspage->lock)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 mm/zsmalloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 10a96651cb97..7ec69a1140cf 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1846,6 +1846,7 @@ static void migrate_read_unlock(struct zspage *zspage) __releases(&zspage->lock)
 }
 
 static void migrate_write_lock(struct zspage *zspage)
+	__acquires(&zspage->lock)
 {
 	write_lock(&zspage->lock);
 }
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 20/30] mm/zsmalloc: Add missing annotation for migrate_write_unlock()
       [not found] ` <20200223231711.157699-1-jbi.octave@gmail.com>
                     ` (2 preceding siblings ...)
  2020-02-23 23:17   ` [PATCH 19/30] mm/zsmalloc: Add missing annotation for migrate_write_lock() Jules Irenge
@ 2020-02-23 23:17   ` Jules Irenge
  3 siblings, 0 replies; 21+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
  To: boqun.feng
  Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
	Sergey Senozhatsky, Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

Sparse reports a warning at migrate_write_unlock()
warning: context imbalance in migrate_write_unlock() - unexpected unlock
The root cause is the missing annotation at migrate_write_unlock()
Add the missing __releases(&zspage->lock)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 mm/zsmalloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 7ec69a1140cf..cb5541d06823 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1852,6 +1852,7 @@ static void migrate_write_lock(struct zspage *zspage)
 }
 
 static void migrate_write_unlock(struct zspage *zspage)
+	__releases(&zspage->lock)
 {
 	write_unlock(&zspage->lock);
 }
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock()
  2020-02-14 20:47   ` [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock() Jules Irenge
@ 2020-02-27 21:52     ` Minchan Kim
  2020-02-27 21:52     ` Minchan Kim
  1 sibling, 0 replies; 21+ messages in thread
From: Minchan Kim @ 2020-02-27 21:52 UTC (permalink / raw)
  To: Jules Irenge
  Cc: linux-kernel, boqun.feng, Nitin Gupta, Sergey Senozhatsky,
	Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

On Fri, Feb 14, 2020 at 08:47:21PM +0000, Jules Irenge wrote:
> Sparse 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
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock()
  2020-02-14 20:47   ` [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock() Jules Irenge
  2020-02-27 21:52     ` Minchan Kim
@ 2020-02-27 21:52     ` Minchan Kim
  1 sibling, 0 replies; 21+ messages in thread
From: Minchan Kim @ 2020-02-27 21:52 UTC (permalink / raw)
  To: Jules Irenge
  Cc: linux-kernel, boqun.feng, Nitin Gupta, Sergey Senozhatsky,
	Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

On Fri, Feb 14, 2020 at 08:47:21PM +0000, Jules Irenge wrote:
> Sparse 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
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 12/30] mm/zsmalloc: Add missing annotation for pin_tag()
  2020-02-14 20:47   ` [PATCH 12/30] mm/zsmalloc: Add missing annotation for pin_tag() Jules Irenge
@ 2020-02-27 21:53     ` Minchan Kim
  0 siblings, 0 replies; 21+ messages in thread
From: Minchan Kim @ 2020-02-27 21:53 UTC (permalink / raw)
  To: Jules Irenge
  Cc: linux-kernel, boqun.feng, Nitin Gupta, Sergey Senozhatsky,
	Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

On Fri, Feb 14, 2020 at 08:47:23PM +0000, Jules Irenge wrote:
> Sparse 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
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 13/30] mm/zsmalloc: Add missing annotation for unpin_tag()
  2020-02-14 20:47   ` [PATCH 13/30] mm/zsmalloc: Add missing annotation for unpin_tag() Jules Irenge
@ 2020-02-27 21:53     ` Minchan Kim
  0 siblings, 0 replies; 21+ messages in thread
From: Minchan Kim @ 2020-02-27 21:53 UTC (permalink / raw)
  To: Jules Irenge
  Cc: linux-kernel, boqun.feng, Nitin Gupta, Sergey Senozhatsky,
	Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

On Fri, Feb 14, 2020 at 08:47:24PM +0000, Jules Irenge wrote:
> Sparse 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
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 11/30] mm/zsmalloc: Add missing annotation for migrate_read_unlock()
  2020-02-14 20:47   ` [PATCH 11/30] mm/zsmalloc: Add missing annotation for migrate_read_unlock() Jules Irenge
@ 2020-02-27 21:54     ` Minchan Kim
  0 siblings, 0 replies; 21+ messages in thread
From: Minchan Kim @ 2020-02-27 21:54 UTC (permalink / raw)
  To: Jules Irenge
  Cc: linux-kernel, boqun.feng, Nitin Gupta, Sergey Senozhatsky,
	Andrew Morton,
	open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR

On Fri, Feb 14, 2020 at 08:47:22PM +0000, Jules Irenge wrote:
> Sparse 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
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-02-27 21:54 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <0/30>
     [not found] ` <20200214204741.94112-1-jbi.octave@gmail.com>
2020-02-14 20:47   ` [PATCH 03/30] mm/memcontrol: Add missing annotation for unlock_page_lru() Jules Irenge
2020-02-14 20:47   ` [PATCH 04/30] mm/memcontrol: Add missing annotation for lock_page_lru() Jules Irenge
2020-02-14 20:47   ` [PATCH 05/30] mm/compaction: Add missing annotation for compact_lock_irqsave Jules Irenge
2020-02-14 20:47   ` [PATCH 06/30] mm/hugetlb: Add missing annotation for gather_surplus_pages() Jules Irenge
2020-02-14 23:40     ` Mike Kravetz
2020-02-14 20:47   ` [PATCH 07/30] mm/mempolicy: Add missing annotation for queue_pages_pmd() Jules Irenge
2020-02-14 20:47   ` [PATCH 08/30] mm/slub: Add missing annotation for get_map() Jules Irenge
2020-02-14 20:47   ` [PATCH 09/30] mm/slub: Add missing annotation for put_map() Jules Irenge
2020-02-14 20:47   ` [PATCH 10/30] mm/zsmalloc: Add missing annotation for migrate_read_lock() Jules Irenge
2020-02-27 21:52     ` Minchan Kim
2020-02-27 21:52     ` Minchan Kim
2020-02-14 20:47   ` [PATCH 11/30] mm/zsmalloc: Add missing annotation for migrate_read_unlock() Jules Irenge
2020-02-27 21:54     ` Minchan Kim
2020-02-14 20:47   ` [PATCH 12/30] mm/zsmalloc: Add missing annotation for pin_tag() Jules Irenge
2020-02-27 21:53     ` Minchan Kim
2020-02-14 20:47   ` [PATCH 13/30] mm/zsmalloc: Add missing annotation for unpin_tag() Jules Irenge
2020-02-27 21:53     ` Minchan Kim
     [not found] ` <20200223231711.157699-1-jbi.octave@gmail.com>
2020-02-23 23:16   ` [PATCH 17/30] mm/zsmalloc: Add missing annotation for zs_map_object() Jules Irenge
2020-02-23 23:16   ` [PATCH 18/30] mm/zsmalloc: Add missing annotation for zs_unmap_object() Jules Irenge
2020-02-23 23:17   ` [PATCH 19/30] mm/zsmalloc: Add missing annotation for migrate_write_lock() Jules Irenge
2020-02-23 23:17   ` [PATCH 20/30] mm/zsmalloc: Add missing annotation for migrate_write_unlock() Jules Irenge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).