Thread (8 messages) 8 messages, 5 authors, 2015-11-03

Re: [PATCH] cxl: Fix reference count on struct pid when attaching

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2015-11-03 01:00:46

On Tue, 2015-11-03 at 10:48 +1100, Ian Munsie wrote:
Excerpts from Michael Ellerman's message of 2015-11-02 11:53:45 +1100:
quoted
On Thu, 2015-10-29 at 13:39 +0100, Frederic Barrat wrote:
quoted
When the cxl driver creates a context, it stores the pid of the
calling task, incrementing the reference count on the struct
pid. Current code mistakenly increments the reference count twice,
once through get_task_pid(), once through get_pid(). The reference
count is only decremented once on detach, thus the struct pid of the
task attaching is never freed. The fix is to simply remove the call to
get_pid().

Signed-off-by: Frederic Barrat <redacted>
What's the symptom?
Everytime a process attached to a capi device it would reduce the total
number of processes that can be running simultaneously by one.
Right, and reduced it permanently until the next reboot, so eventually you'd
kill your system presumably.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help