Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1232400
| From | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [patch] mm, oom: remove task_lock protecting comm printing |
| Date | 2015-09-24 21:50 +0200 |
| Message-ID | <qckGK-4iF-27@gated-at.bofh.it> (permalink) |
| References | <qbFkf-3rQ-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Sep 22, 2015 at 04:30:13PM -0700, David Rientjes wrote: > The oom killer takes task_lock() in a couple of places solely to protect > printing the task's comm. > > A process's comm, including current's comm, may change due to > /proc/pid/comm or PR_SET_NAME. > > The comm will always be NULL-terminated, so the worst race scenario would > only be during update. We can tolerate a comm being printed that is in > the middle of an update to avoid taking the lock. > > Other locations in the kernel have already dropped task_lock() when > printing comm, so this is consistent. > > Suggested-by: Oleg Nesterov <oleg@redhat.com> > Signed-off-by: David Rientjes <rientjes@google.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[patch] mm, oom: remove task_lock protecting comm printing David Rientjes <rientjes@google.com> - 2015-09-23 01:40 +0200
Re: [patch] mm, oom: remove task_lock protecting comm printing Michal Hocko <mhocko@kernel.org> - 2015-09-23 09:50 +0200
Re: [patch] mm, oom: remove task_lock protecting comm printing Vladimir Davydov <vdavydov@parallels.com> - 2015-09-23 10:10 +0200
Re: [patch] mm, oom: remove task_lock protecting comm printing Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-09-23 11:20 +0200
Re: [patch] mm, oom: remove task_lock protecting comm printing Vladimir Davydov <vdavydov@parallels.com> - 2015-09-23 11:40 +0200
Re: [patch] mm, oom: remove task_lock protecting comm printing Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-09-23 11:50 +0200
Re: [patch] mm, oom: remove task_lock protecting comm printing Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-09-23 12:00 +0200
Re: [patch] mm, oom: remove task_lock protecting comm printing Vladimir Davydov <vdavydov@parallels.com> - 2015-09-23 12:10 +0200
Re: [patch] mm, oom: remove task_lock protecting comm printing Michal Hocko <mhocko@kernel.org> - 2015-09-23 12:50 +0200
Re: [patch] mm, oom: remove task_lock protecting comm printing Michal Hocko <mhocko@kernel.org> - 2015-09-23 11:50 +0200
Re: [patch] mm, oom: remove task_lock protecting comm printing Johannes Weiner <hannes@cmpxchg.org> - 2015-09-24 21:50 +0200
csiph-web