Thread (2 messages) 2 messages, 2 authors, 2016-05-26

Re: [PATCH 6/6] mm, oom: fortify task_will_free_mem

From: Michal Hocko <mhocko@kernel.org>
Date: 2016-05-26 14:56:12
Also in: lkml

On Thu 26-05-16 23:41:54, Tetsuo Handa wrote:
Michal Hocko wrote:
quoted
+/*
+ * Checks whether the given task is dying or exiting and likely to
+ * release its address space. This means that all threads and processes
+ * sharing the same mm have to be killed or exiting.
+ */
+static inline bool task_will_free_mem(struct task_struct *task)
+{
+	struct mm_struct *mm = NULL;
+	struct task_struct *p;
+	bool ret = false;
If atomic_read(&p->mm->mm_users) <= get_nr_threads(p), this returns "false".
According to previous version, I think this is "bool ret = true;".
true. Thanks for catching this. Fixed locally.
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help