linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
To: Ian Munsie <imunsie@au1.ibm.com>, Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Frederic Barrat <frederic.barrat@fr.ibm.com>
Subject: Re: [PATCH] cxl: Fix reference count on struct pid when attaching
Date: Tue, 3 Nov 2015 09:17:12 +0100	[thread overview]
Message-ID: <56386D88.3020206@linux.vnet.ibm.com> (raw)
In-Reply-To: <1446507545-sup-9915@delenn.ozlabs.ibm.com>



Le 03/11/2015 00:48, Ian Munsie a écrit :
> 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.


So I'm dropping this patch and will resubmit as 2 separate patches.

   Fred

  parent reply	other threads:[~2015-11-03  8:17 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
2015-11-03  8:17     ` Frederic Barrat [this message]
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=56386D88.3020206@linux.vnet.ibm.com \
    --to=fbarrat@linux.vnet.ibm.com \
    --cc=frederic.barrat@fr.ibm.com \
    --cc=imunsie@au1.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).