linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 4.19 00/86] 4.19.135-rc1 review
       [not found] <20200727134914.312934924@linuxfoundation.org>
@ 2020-07-28  8:34 ` Naresh Kamboju
  2020-07-28 13:03   ` [External] " Muchun Song
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2020-07-28  8:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman, songmuchun
  Cc: open list, Linus Torvalds, Andrew Morton, Guenter Roeck,
	Shuah Khan, patches, Ben Hutchings, linux- stable, Hugh Dickins,
	Christoph Lameter, Roman Gushchin, iamjoonsoo.kim, linux-mm,
	mm-commits, penberg, rientjes, Shakeel Butt, Vlastimil Babka,
	Arnd Bergmann, lkft-triage, clang-built-linux

On Mon, 27 Jul 2020 at 19:40, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 4.19.135 release.
> There are 86 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Wed, 29 Jul 2020 13:48:51 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
>         https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.135-rc1.gz
> or in the git tree and branch at:
>         git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
> -------------
> Pseudo-Shortlog of commits:
<trim>

Results from Linaro’s test farm.
Regressions detected on x86_64.

Boot failures on x86_64 devices running 4.19.135-rc1 kernel.

Summary
------------------------------------------------------------------------

kernel: 4.19.135-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.19.y
git commit: e11702667f84474535b156dbb194deffa0a6cdb4
git describe: v4.19.134-87-ge11702667f84
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.19-oe/build/v4.19.134-87-ge11702667f84

> Muchun Song <songmuchun@bytedance.com>
>     mm: memcg/slab: fix memory leak at non-root kmem_cache destroy

[    2.510884] ============================================
[    2.510884] WARNING: possible recursive locking detected
[    2.510884] 4.19.135-rc1 #1 Not tainted
[    2.510884] --------------------------------------------
[    2.510884] swapper/0/1 is trying to acquire lock:
[    2.510884] 0000000088703397 (slab_mutex){+.+.}, at:
kmem_cache_destroy+0x9a/0x2b0
[    2.510884]
[    2.510884] but task is already holding lock:
[    2.510884] 0000000088703397 (slab_mutex){+.+.}, at:
kmem_cache_destroy+0x45/0x2b0
[    2.510884]
[    2.510884] other info that might help us debug this:
[    2.510884]  Possible unsafe locking scenario:
[    2.510884]
[    2.510884]        CPU0
[    2.510884]        ----
[    2.510884]   lock(slab_mutex);
[    2.510884]   lock(slab_mutex);
[    2.510884]
[    2.510884]  *** DEADLOCK ***
[    2.510884]
[    2.510884]  May be due to missing lock nesting notation
[    2.510884]
[    2.510884] 3 locks held by swapper/0/1:
[    2.510884]  #0: 000000008702dddc (cpu_hotplug_lock.rw_sem){++++},
at: kmem_cache_destroy+0x32/0x2b0
[    2.510884]  #1: 0000000050103e4d (mem_hotplug_lock.rw_sem){++++},
at: kmem_cache_destroy+0x37/0x2b0
[    2.510884]  #2: 0000000088703397 (slab_mutex){+.+.}, at:
kmem_cache_destroy+0x45/0x2b0
[    2.510884]
[    2.510884] stack backtrace:
[    2.510884] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.19.135-rc1 #1
[    2.510884] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS
2.0b 07/27/2017
[    2.510884] Call Trace:
[    2.510884]  dump_stack+0x7a/0xa5
[    2.510884]  __lock_acquire+0x6f1/0x1380
[    2.510884]  ? ret_from_fork+0x3a/0x50
[    2.510884]  lock_acquire+0x95/0x190
[    2.510884]  ? lock_acquire+0x95/0x190
[    2.510884]  ? kmem_cache_destroy+0x9a/0x2b0
[    2.510884]  ? kmem_cache_destroy+0x9a/0x2b0
[    2.510884]  __mutex_lock+0x83/0x990
[    2.510884]  ? kmem_cache_destroy+0x9a/0x2b0
[    2.510884]  ? kmem_cache_destroy+0x60/0x2b0
[    2.510884]  ? set_debug_rodata+0x17/0x17
[    2.510884]  ? set_debug_rodata+0x17/0x17
[    2.510884]  mutex_lock_nested+0x1b/0x20
[    2.510884]  ? get_online_mems+0x5f/0x90
[    2.510884]  ? mutex_lock_nested+0x1b/0x20
[    2.510884]  kmem_cache_destroy+0x9a/0x2b0
[    2.510884]  ? set_debug_rodata+0x17/0x17
[    2.510884]  intel_iommu_init+0x11c6/0x1326
[    2.510884]  ? kfree+0xc4/0x240
[    2.510884]  ? lockdep_hardirqs_on+0xef/0x180
[    2.510884]  ? kfree+0xc4/0x240
[    2.510884]  ? trace_hardirqs_on+0x4c/0x100
[    2.510884]  ? unpack_to_rootfs+0x272/0x29a
[    2.510884]  ? e820__memblock_setup+0x64/0x64
[    2.510884]  ? set_debug_rodata+0x17/0x17
[    2.510884]  pci_iommu_init+0x1a/0x44
[    2.510884]  ? e820__memblock_setup+0x64/0x64
[    2.510884]  ? pci_iommu_init+0x1a/0x44
[    2.510884]  do_one_initcall+0x61/0x2b4
[    2.510884]  ? set_debug_rodata+0xa/0x17
[    2.510884]  ? rcu_read_lock_sched_held+0x81/0x90
[    2.510884]  kernel_init_freeable+0x1d8/0x270
[    2.510884]  ? rest_init+0x190/0x190
[    2.510884]  kernel_init+0xe/0x110
[    2.510884]  ret_from_fork+0x3a/0x50


Full test log:
https://pastebin.com/PWkk0YaF

-- 
Linaro LKFT
https://lkft.linaro.org


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

* Re: [External] Re: [PATCH 4.19 00/86] 4.19.135-rc1 review
  2020-07-28  8:34 ` [PATCH 4.19 00/86] 4.19.135-rc1 review Naresh Kamboju
@ 2020-07-28 13:03   ` Muchun Song
  2020-07-28 14:35     ` Naresh Kamboju
  0 siblings, 1 reply; 3+ messages in thread
From: Muchun Song @ 2020-07-28 13:03 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: Greg Kroah-Hartman, open list, Linus Torvalds, Andrew Morton,
	Guenter Roeck, Shuah Khan, patches, Ben Hutchings, linux- stable,
	Hugh Dickins, Christoph Lameter, Roman Gushchin, Joonsoo Kim,
	linux-mm, mm-commits, Pekka Enberg, David Rientjes, Shakeel Butt,
	Vlastimil Babka, Arnd Bergmann, lkft-triage, clang-built-linux

Thanks for your test. I have reviewed the patch:

[PATCH 4.19 76/86] mm: memcg/slab: fix memory leak at non-root
kmem_cache destroy

There is a backport problem and I have pointed out the problem in that email.

On Tue, Jul 28, 2020 at 4:34 PM Naresh Kamboju
<naresh.kamboju@linaro.org> wrote:
>
> On Mon, 27 Jul 2020 at 19:40, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > This is the start of the stable review cycle for the 4.19.135 release.
> > There are 86 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> >
> > Responses should be made by Wed, 29 Jul 2020 13:48:51 +0000.
> > Anything received after that time might be too late.
> >
> > The whole patch series can be found in one patch at:
> >         https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.135-rc1.gz
> > or in the git tree and branch at:
> >         git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
> > and the diffstat can be found below.
> >
> > thanks,
> >
> > greg k-h
> >
> > -------------
> > Pseudo-Shortlog of commits:
> <trim>
>
> Results from Linaro’s test farm.
> Regressions detected on x86_64.
>
> Boot failures on x86_64 devices running 4.19.135-rc1 kernel.
>
> Summary
> ------------------------------------------------------------------------
>
> kernel: 4.19.135-rc1
> git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> git branch: linux-4.19.y
> git commit: e11702667f84474535b156dbb194deffa0a6cdb4
> git describe: v4.19.134-87-ge11702667f84
> Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.19-oe/build/v4.19.134-87-ge11702667f84
>
> > Muchun Song <songmuchun@bytedance.com>
> >     mm: memcg/slab: fix memory leak at non-root kmem_cache destroy
>
> [    2.510884] ============================================
> [    2.510884] WARNING: possible recursive locking detected
> [    2.510884] 4.19.135-rc1 #1 Not tainted
> [    2.510884] --------------------------------------------
> [    2.510884] swapper/0/1 is trying to acquire lock:
> [    2.510884] 0000000088703397 (slab_mutex){+.+.}, at:
> kmem_cache_destroy+0x9a/0x2b0
> [    2.510884]
> [    2.510884] but task is already holding lock:
> [    2.510884] 0000000088703397 (slab_mutex){+.+.}, at:
> kmem_cache_destroy+0x45/0x2b0
> [    2.510884]
> [    2.510884] other info that might help us debug this:
> [    2.510884]  Possible unsafe locking scenario:
> [    2.510884]
> [    2.510884]        CPU0
> [    2.510884]        ----
> [    2.510884]   lock(slab_mutex);
> [    2.510884]   lock(slab_mutex);
> [    2.510884]
> [    2.510884]  *** DEADLOCK ***
> [    2.510884]
> [    2.510884]  May be due to missing lock nesting notation
> [    2.510884]
> [    2.510884] 3 locks held by swapper/0/1:
> [    2.510884]  #0: 000000008702dddc (cpu_hotplug_lock.rw_sem){++++},
> at: kmem_cache_destroy+0x32/0x2b0
> [    2.510884]  #1: 0000000050103e4d (mem_hotplug_lock.rw_sem){++++},
> at: kmem_cache_destroy+0x37/0x2b0
> [    2.510884]  #2: 0000000088703397 (slab_mutex){+.+.}, at:
> kmem_cache_destroy+0x45/0x2b0
> [    2.510884]
> [    2.510884] stack backtrace:
> [    2.510884] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.19.135-rc1 #1
> [    2.510884] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS
> 2.0b 07/27/2017
> [    2.510884] Call Trace:
> [    2.510884]  dump_stack+0x7a/0xa5
> [    2.510884]  __lock_acquire+0x6f1/0x1380
> [    2.510884]  ? ret_from_fork+0x3a/0x50
> [    2.510884]  lock_acquire+0x95/0x190
> [    2.510884]  ? lock_acquire+0x95/0x190
> [    2.510884]  ? kmem_cache_destroy+0x9a/0x2b0
> [    2.510884]  ? kmem_cache_destroy+0x9a/0x2b0
> [    2.510884]  __mutex_lock+0x83/0x990
> [    2.510884]  ? kmem_cache_destroy+0x9a/0x2b0
> [    2.510884]  ? kmem_cache_destroy+0x60/0x2b0
> [    2.510884]  ? set_debug_rodata+0x17/0x17
> [    2.510884]  ? set_debug_rodata+0x17/0x17
> [    2.510884]  mutex_lock_nested+0x1b/0x20
> [    2.510884]  ? get_online_mems+0x5f/0x90
> [    2.510884]  ? mutex_lock_nested+0x1b/0x20
> [    2.510884]  kmem_cache_destroy+0x9a/0x2b0
> [    2.510884]  ? set_debug_rodata+0x17/0x17
> [    2.510884]  intel_iommu_init+0x11c6/0x1326
> [    2.510884]  ? kfree+0xc4/0x240
> [    2.510884]  ? lockdep_hardirqs_on+0xef/0x180
> [    2.510884]  ? kfree+0xc4/0x240
> [    2.510884]  ? trace_hardirqs_on+0x4c/0x100
> [    2.510884]  ? unpack_to_rootfs+0x272/0x29a
> [    2.510884]  ? e820__memblock_setup+0x64/0x64
> [    2.510884]  ? set_debug_rodata+0x17/0x17
> [    2.510884]  pci_iommu_init+0x1a/0x44
> [    2.510884]  ? e820__memblock_setup+0x64/0x64
> [    2.510884]  ? pci_iommu_init+0x1a/0x44
> [    2.510884]  do_one_initcall+0x61/0x2b4
> [    2.510884]  ? set_debug_rodata+0xa/0x17
> [    2.510884]  ? rcu_read_lock_sched_held+0x81/0x90
> [    2.510884]  kernel_init_freeable+0x1d8/0x270
> [    2.510884]  ? rest_init+0x190/0x190
> [    2.510884]  kernel_init+0xe/0x110
> [    2.510884]  ret_from_fork+0x3a/0x50
>
>
> Full test log:
> https://pastebin.com/PWkk0YaF
>
> --
> Linaro LKFT
> https://lkft.linaro.org



--
Yours,
Muchun


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

* Re: [External] Re: [PATCH 4.19 00/86] 4.19.135-rc1 review
  2020-07-28 13:03   ` [External] " Muchun Song
@ 2020-07-28 14:35     ` Naresh Kamboju
  0 siblings, 0 replies; 3+ messages in thread
From: Naresh Kamboju @ 2020-07-28 14:35 UTC (permalink / raw)
  To: Muchun Song
  Cc: Greg Kroah-Hartman, open list, Linus Torvalds, Andrew Morton,
	Guenter Roeck, Shuah Khan, patches, Ben Hutchings, linux- stable,
	Hugh Dickins, Christoph Lameter, Roman Gushchin, Joonsoo Kim,
	linux-mm, mm-commits, Pekka Enberg, David Rientjes, Shakeel Butt,
	Vlastimil Babka, Arnd Bergmann, lkft-triage, clang-built-linux

On Tue, 28 Jul 2020 at 18:33, Muchun Song <songmuchun@bytedance.com> wrote:
>
> Thanks for your test. I have reviewed the patch:
>
> [PATCH 4.19 76/86] mm: memcg/slab: fix memory leak at non-root
> kmem_cache destroy
>
> There is a backport problem and I have pointed out the problem in that email.

Thanks for your suggestions on the other email thread.
I have made changes as you said and boot test pass on x86 now.

diff --git a/mm/slab_common.c b/mm/slab_common.c
index 9c5eb4b08fc3..65bc49f19504 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -842,9 +842,7 @@ static int shutdown_memcg_caches(struct kmem_cache *s)

 static void memcg_set_kmem_cache_dying(struct kmem_cache *s)
 {
-       mutex_lock(&slab_mutex);
        s->memcg_params.dying = true;
-       mutex_unlock(&slab_mutex);
 }

 static void flush_memcg_workqueue(struct kmem_cache *s)

- Naresh


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

end of thread, other threads:[~2020-07-28 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200727134914.312934924@linuxfoundation.org>
2020-07-28  8:34 ` [PATCH 4.19 00/86] 4.19.135-rc1 review Naresh Kamboju
2020-07-28 13:03   ` [External] " Muchun Song
2020-07-28 14:35     ` Naresh Kamboju

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