Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1310461
| From | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] memcg: Only free spare array when readers are done |
| Date | 2016-01-15 22:00 +0100 |
| Message-ID | <qRjDs-2R7-21@gated-at.bofh.it> (permalink) |
| References | <qQQrM-7NG-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Jan 14, 2016 at 02:33:52PM +0100, Martijn Coenen wrote: > A spare array holding mem cgroup threshold events is kept around > to make sure we can always safely deregister an event and have an > array to store the new set of events in. > > In the scenario where we're going from 1 to 0 registered events, the > pointer to the primary array containing 1 event is copied to the spare > slot, and then the spare slot is freed because no events are left. > However, it is freed before calling synchronize_rcu(), which means > readers may still be accessing threshold->primary after it is freed. > > Fixed by only freeing after synchronize_rcu(). > > Signed-off-by: Martijn Coenen <maco@google.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] memcg: Only free spare array when readers are done Martijn Coenen <maco@google.com> - 2016-01-14 14:50 +0100
Re: [PATCH] memcg: Only free spare array when readers are done Michal Hocko <mhocko@kernel.org> - 2016-01-14 15:40 +0100
Re: [PATCH] memcg: Only free spare array when readers are done Martijn Coenen <maco@google.com> - 2016-01-14 16:40 +0100
Re: [PATCH] memcg: Only free spare array when readers are done Vladimir Davydov <vdavydov@virtuozzo.com> - 2016-01-15 12:20 +0100
Re: [PATCH] memcg: Only free spare array when readers are done Johannes Weiner <hannes@cmpxchg.org> - 2016-01-15 22:00 +0100
csiph-web