[PATCH] cxl: Fix struct pid leak when attaching a process through user API

Andrew Donnellan andrew.donnellan at au1.ibm.com
Wed Nov 4 09:45:19 AEDT 2015


On 03/11/15 23:13, Frederic Barrat wrote:
> When the cxl driver creates a context, it stores the pid of the
> calling task, and mistakenly increments the reference count of the
> struct pid twice, once through get_task_pid(), once through
> get_pid(). The reference count is only decremented once on detach. As
> a result, a struct pid is leaked and it reduces the number of
> processes that can run simultaneously by one.
> The fix is to simply remove the call to get_pid().
>
> There is a separate patch for the kernel API, since it goes to
> different kernel versions.
>
> Signed-off-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
> Cc: <stable at vger.kernel.org> # 3.18+

Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

-- 
Andrew Donnellan              Software Engineer, OzLabs
andrew.donnellan at au1.ibm.com  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited



More information about the Linuxppc-dev mailing list