public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Ian Munsie <imunsie@au1•ibm.com>
Cc: Frederic Barrat <frederic.barrat@fr•ibm.com>,
	linuxppc-dev <linuxppc-dev@lists•ozlabs.org>
Subject: Re: [PATCH] cxl: Fix reference count on struct pid when attaching
Date: Tue, 03 Nov 2015 12:00:46 +1100	[thread overview]
Message-ID: <1446512446.31246.5.camel@ellerman.id.au> (raw)
In-Reply-To: <1446507545-sup-9915@delenn.ozlabs.ibm.com>

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:
> > On Thu, 2015-10-29 at 13:39 +0100, Frederic Barrat wrote:
> > 
> > > 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 <frederic.barrat@fr•ibm.com>
> > 
> > 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

  reply	other threads:[~2015-11-03  1:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29 12:39 [PATCH] cxl: Fix reference count on struct pid when attaching Frederic Barrat
2015-10-30  0:31 ` Andrew Donnellan
2015-10-30  2:56 ` Ian Munsie
2015-11-02  0:53 ` Michael Ellerman
2015-11-02 23:48   ` Ian Munsie
2015-11-03  1:00     ` Michael Ellerman [this message]
2015-11-03  8:17     ` Frederic Barrat
2015-11-03  9:11       ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446512446.31246.5.camel@ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=frederic.barrat@fr$(echo .)ibm.com \
    --cc=imunsie@au1$(echo .)ibm.com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox