Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1704151
| From | Cong Wang <xiyou.wangcong@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: fix list corruptions on shmem shrinklist |
| Date | 2017-08-04 20:10 +0200 |
| Message-ID | <uaPcS-20M-23@gated-at.bofh.it> (permalink) |
| References | <uahbb-3Vp-5@gated-at.bofh.it> <uaxzl-72m-31@gated-at.bofh.it> <uaxJ0-76G-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Aug 3, 2017 at 4:25 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote: > On Thu, Aug 3, 2017 at 4:11 PM, Andrew Morton <akpm@linux-foundation.org> wrote: >> >> Where is this INIT_LIST_HEAD()? > > I think it's this one: > > list_del_init(&info->shrinklist); > > in shmem_unused_huge_shrink(). Yes, this is correct. Sorry about confusion. > >> I'm not sure I'm understanding this. AFAICT all the list operations to >> which you refer are synchronized under spin_lock(&sbinfo->shrinklist_lock)? > > No, notice how shmem_unused_huge_shrink() does the > > list_move(&info->shrinklist, &to_remove); > > and > > list_move(&info->shrinklist, &list); > > to move to (two different) private lists under the shrinklist_lock, > but once it is on that private "list/to_remove" list, it is then > accessed outside the locked region. > > Honestly, I don't love this situation, or the patch, but I think the > patch is likely the right thing to do. > Me neither. This is probably the quickest fix we could have, other possible changes might need much more work. Thanks.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] mm: fix list corruptions on shmem shrinklist Cong Wang <xiyou.wangcong@gmail.com> - 2017-08-03 07:50 +0200
Re: [PATCH] mm: fix list corruptions on shmem shrinklist Andrew Morton <akpm@linux-foundation.org> - 2017-08-04 01:20 +0200
Re: [PATCH] mm: fix list corruptions on shmem shrinklist Linus Torvalds <torvalds@linux-foundation.org> - 2017-08-04 01:30 +0200
Re: [PATCH] mm: fix list corruptions on shmem shrinklist Andrew Morton <akpm@linux-foundation.org> - 2017-08-04 02:00 +0200
Re: [PATCH] mm: fix list corruptions on shmem shrinklist "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-08-04 16:50 +0200
Re: [PATCH] mm: fix list corruptions on shmem shrinklist Cong Wang <xiyou.wangcong@gmail.com> - 2017-08-04 20:00 +0200
Re: [PATCH] mm: fix list corruptions on shmem shrinklist Cong Wang <xiyou.wangcong@gmail.com> - 2017-08-04 20:10 +0200
csiph-web