Re: [PATCH] memcg: Fix NULL pointer deref in task_in_mem_cgroup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 23, 2014 at 06:47:45PM +0200, Jan Kara wrote:
> 'curr' pointer in task_in_mem_cgroup() can be NULL when we race with
> somebody clearing task->mm. Check for it before dereferencing the
> pointer.

If task->mm is already NULL, we fall back to mem_cgroup_from_task(),
which definitely returns a memcg unless you pass NULL in there.  So I
don't see how that could happen, and the NULL checks in the fallback
branch as well as in __mem_cgroup_same_or_subtree seem bogus to me.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]