All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: dada1@cosmosbay.com, a.p.zijlstra@chello.nl, cmm@us.ibm.com,
	davem@davemloft.net, mm-commits@vger.kernel.org
Subject: - percpu_counter-fix-cpu-unplug-race-in-percpu_counter_destroy.patch removed from -mm tree
Date: Wed, 10 Dec 2008 11:28:41 -0800	[thread overview]
Message-ID: <200812101928.mBAJSf9R021301@imap1.linux-foundation.org> (raw)


The patch titled
     percpu_counter: fix CPU unplug race in percpu_counter_destroy()
has been removed from the -mm tree.  Its filename was
     percpu_counter-fix-cpu-unplug-race-in-percpu_counter_destroy.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: percpu_counter: fix CPU unplug race in percpu_counter_destroy()
From: Eric Dumazet <dada1@cosmosbay.com>

We should first delete the counter from percpu_counters list
before freeing memory, or a percpu_counter_hotcpu_callback()
could dereference a NULL pointer.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/percpu_counter.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN lib/percpu_counter.c~percpu_counter-fix-cpu-unplug-race-in-percpu_counter_destroy lib/percpu_counter.c
--- a/lib/percpu_counter.c~percpu_counter-fix-cpu-unplug-race-in-percpu_counter_destroy
+++ a/lib/percpu_counter.c
@@ -104,13 +104,13 @@ void percpu_counter_destroy(struct percp
 	if (!fbc->counters)
 		return;
 
-	free_percpu(fbc->counters);
-	fbc->counters = NULL;
 #ifdef CONFIG_HOTPLUG_CPU
 	mutex_lock(&percpu_counters_lock);
 	list_del(&fbc->list);
 	mutex_unlock(&percpu_counters_lock);
 #endif
+	free_percpu(fbc->counters);
+	fbc->counters = NULL;
 }
 EXPORT_SYMBOL(percpu_counter_destroy);
 
_

Patches currently in -mm which might be from dada1@cosmosbay.com are

origin.patch
linux-next.patch
percpu_counter-fbc_batch-should-be-a-variable.patch
softirq-introduce-statistics-for-softirq.patch
proc-export-statistics-for-softirq-to-proc.patch
proc-update-document-for-proc-softirqs-and-proc-stat.patch


                 reply	other threads:[~2008-12-10 19:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200812101928.mBAJSf9R021301@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=cmm@us.ibm.com \
    --cc=dada1@cosmosbay.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.