diff options
| author | David Rientjes <rientjes@google.com> | 2015-11-05 18:48:05 -0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-07-08 14:08:55 +0200 |
| commit | 173048a77ade2e0a276ba52ebf5e9ead5f4091d3 (patch) | |
| tree | 2b5fc3e96a25133ec716eba4c5361c0be31eb608 /include/linux/timerqueue.h | |
| parent | 3feac374ea522799fa5470b4f6d8d577b5490974 (diff) | |
mm, oom: remove task_lock protecting comm printing
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.
Change-Id: I89f64666a1db5d414aa53862fd6b665bbb8125bc
Signed-off-by: David Rientjes <rientjes@google.com>
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Vladimir Davydov <vdavydov@parallels.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
