Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1697754
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] mm: memcg: fix css double put in mem_cgroup_iter |
| Date | 2017-07-27 09:00 +0200 |
| Message-ID | <u7KW5-2LK-5@gated-at.bofh.it> (permalink) |
| References | <u7ueC-Iw-11@gated-at.bofh.it> <u7uRk-Xi-13@gated-at.bofh.it> <u7HOx-QN-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu 27-07-17 11:30:50, Wenwei Tao wrote:
> 2017-07-26 21:44 GMT+08:00 Michal Hocko <mhocko@kernel.org>:
> > On Wed 26-07-17 21:07:42, Wenwei Tao wrote:
[...]
> >> I think there is a css double put in mem_cgroup_iter. Under reclaim,
> >> we call mem_cgroup_iter the first time with prev == NULL, and we get
> >> last_visited memcg from per zone's reclaim_iter then call __mem_cgroup_iter_next
> >> try to get next alive memcg, __mem_cgroup_iter_next could return NULL
> >> if last_visited is already the last one so we put the last_visited's
> >> memcg css and continue to the next while loop, this time we might not
> >> do css_tryget(&last_visited->css) if the dead_count is changed, but
> >> we still do css_put(&last_visited->css), we put it twice, this could
> >> trigger the BUG_ON at kernel/cgroup.c:893.
> >
> > Yes, I guess your are right and I suspect that this has been silently
> > fixed by 519ebea3bf6d ("mm: memcontrol: factor out reclaim iterator
> > loading and updating"). I think a more appropriate fix is would be.
> > Are you able to reproduce and re-test it?
> > ---
>
> Yes, I think this commit can fix this issue, and I backport this
> commit to 3.10.107 kernel and cannot reproduce this issue. I guess
> this commit might need to be backported to 3.10.y stable kernel.
Please send it to the kernel-stable mailing list. 3.10 seems to be still
maintained.
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC PATCH] mm: memcg: fix css double put in mem_cgroup_iter Wenwei Tao <wenwei.tww@gmail.com> - 2017-07-26 15:10 +0200
Re: [RFC PATCH] mm: memcg: fix css double put in mem_cgroup_iter Michal Hocko <mhocko@kernel.org> - 2017-07-26 15:50 +0200
Re: [RFC PATCH] mm: memcg: fix css double put in mem_cgroup_iter Wenwei Tao <wenwei.tww@gmail.com> - 2017-07-27 05:40 +0200
Re: [RFC PATCH] mm: memcg: fix css double put in mem_cgroup_iter Michal Hocko <mhocko@kernel.org> - 2017-07-27 09:00 +0200
csiph-web