]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Revert "fix up queue-4.19/mm-memcg-slab-fix-memory-leak-at-non-root-kmem_cache-destro...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Jul 2020 15:27:25 +0000 (17:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Jul 2020 15:27:25 +0000 (17:27 +0200)
This reverts commit da91bd22b6f50ff1689ed6a1b17f2d71d4abfc2a.

queue-4.19/mm-memcg-slab-fix-memory-leak-at-non-root-kmem_cache-destroy.patch

index d9fb93d0634bbfd905c79ff82e1c27676c05d908..9e3c35aaae6b08c90033eb38238de26bf8a72fae 100644 (file)
@@ -43,8 +43,8 @@ Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 ---
- mm/slab_common.c |   37 ++++++++++++++++++++++++++++---------
- 1 file changed, 28 insertions(+), 9 deletions(-)
+ mm/slab_common.c |   35 ++++++++++++++++++++++++++++-------
+ 1 file changed, 28 insertions(+), 7 deletions(-)
 
 --- a/mm/slab_common.c
 +++ b/mm/slab_common.c
@@ -63,16 +63,16 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        return 0;
  }
  
-@@ -832,12 +840,13 @@ static int shutdown_memcg_caches(struct
+@@ -832,12 +840,15 @@ static int shutdown_memcg_caches(struct
        return 0;
  }
  
 -static void flush_memcg_workqueue(struct kmem_cache *s)
 +static void memcg_set_kmem_cache_dying(struct kmem_cache *s)
  {
--      mutex_lock(&slab_mutex);
+       mutex_lock(&slab_mutex);
        s->memcg_params.dying = true;
--      mutex_unlock(&slab_mutex);
+       mutex_unlock(&slab_mutex);
 +}
  
 +static void flush_memcg_workqueue(struct kmem_cache *s)
@@ -80,7 +80,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        /*
         * SLUB deactivates the kmem_caches through call_rcu_sched. Make
         * sure all registered rcu callbacks have been invoked.
-@@ -858,10 +867,6 @@ static inline int shutdown_memcg_caches(
+@@ -858,10 +869,6 @@ static inline int shutdown_memcg_caches(
  {
        return 0;
  }
@@ -91,7 +91,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  #endif /* CONFIG_MEMCG_KMEM */
  
  void slab_kmem_cache_release(struct kmem_cache *s)
-@@ -879,8 +884,6 @@ void kmem_cache_destroy(struct kmem_cach
+@@ -879,8 +886,6 @@ void kmem_cache_destroy(struct kmem_cach
        if (unlikely(!s))
                return;
  
@@ -100,7 +100,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        get_online_cpus();
        get_online_mems();
  
-@@ -890,6 +893,22 @@ void kmem_cache_destroy(struct kmem_cach
+@@ -890,6 +895,22 @@ void kmem_cache_destroy(struct kmem_cach
        if (s->refcount)
                goto out_unlock;