From: Ian Munsie <imunsie@au1.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
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 10:48:27 +1100 [thread overview]
Message-ID: <1446507545-sup-9915@delenn.ozlabs.ibm.com> (raw)
In-Reply-To: <1446425625.27828.0.camel@ellerman.id.au>
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.
> Broken since when?
> Forever?
> So should go to stable?
> Starting from which release?
Looks like we managed to introduce the same bug twice (d'oh!), so we
should probably split this into two separate patches:
The bug in file.c has existed forever so the fix for that should go to
stable for 3.18+
The bug in api.c will only need to go in for 4.3 since that is the
release where cxlflash was merged and there weren't any users of that
code before that.
Cheers
-Ian
next prev parent reply other threads:[~2015-11-02 23:49 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 [this message]
2015-11-03 1:00 ` Michael Ellerman
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=1446507545-sup-9915@delenn.ozlabs.ibm.com \
--to=imunsie@au1.ibm.com \
--cc=frederic.barrat@fr.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).