login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
26
Re: [PATCH] percpu: fix a memory leak in pcpu_extend_area_map()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Andrew Morton
Subject:
Re: [PATCH] percpu: fix a memory leak in pcpu_extend_area_map()
Date: Thursday, August 26, 2010 - 3:10 pm
On Sun, 08 Aug 2010 14:42:57 +0200 Tejun Heo <tj@kernel.org> wrote:
quoted text
> >From 206c53730b8b1707becca7a868ea8d14ebee24d2 Mon Sep 17 00:00:00 2001 > From: Huang Shijie <shijie8@gmail.com> > Date: Sun, 8 Aug 2010 14:39:07 +0200 > > The original code did not free the old map. This patch fixes it. > > tj: use @old as memcpy source instead of @chunk->map, and indentation > and description update > > Signed-off-by: Huang Shijie <shijie8@gmail.com> > Signed-off-by: Tejun Heo <tj@kernel.org>
Should have had a cc:stable in the changelog, IMO.
quoted text
> --- > Patch applied to percpu#for-linus w/ some updates. Thanks a lot for > catching this. >
This patch appears to have been lost?
quoted text
> diff --git a/mm/percpu.c b/mm/percpu.c > index e61dc2c..a1830d8 100644 > --- a/mm/percpu.c > +++ b/mm/percpu.c > @@ -393,7 +393,9 @@ static int pcpu_extend_area_map(struct pcpu_chunk *chunk, int new_alloc) > goto out_unlock; > > old_size = chunk->map_alloc * sizeof(chunk->map[0]); > - memcpy(new, chunk->map, old_size); > + old = chunk->map; > + > + memcpy(new, old, old_size); > > chunk->map_alloc = new_alloc; > chunk->map = new;
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] percpu: fix a memory leak in pcpu_extend_area_map()
, Tejun Heo
, (Sun Aug 8, 5:42 am)
Re: [PATCH] percpu: fix a memory leak in pcpu_extend_area_ ...
, Andrew Morton
, (Thu Aug 26, 3:10 pm)
Re: [PATCH] percpu: fix a memory leak in pcpu_extend_area_ ...
, Tejun Heo
, (Fri Aug 27, 2:32 am)
breaks 2.6.32.21+ (was: [PATCH] percpu: fix a memory leak ...
, Peter Palfrader
, (Thu Sep 16, 2:36 pm)
Re: [stable] breaks 2.6.32.21+ (was: [PATCH] percpu: fix a ...
, Greg KH
, (Thu Sep 16, 4:13 pm)
Re: [stable] breaks 2.6.32.21+
, Tejun Heo
, (Fri Sep 17, 6:47 am)
Re: [stable] breaks 2.6.32.21+
, Greg KH
, (Fri Sep 17, 9:36 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Frederic Weisbecker
[PATCH v2] struct sort_entry has a callback named snprintf that turns an entry int...
FUJITA Tomonori
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Jens Axboe
Re: [BUG] Linux 2.6.25-rc2 - Regression from 2.6.24-rc1-git1 softlockup while bo...
Andrew Morton
Re: [PATCH v3 0/4] Introduce hardware spinlock framework
Jeff Garzik
Re: 2.6.23-rc7-mm1 AHCI ATA errors -- won't boot
git
:
Junio C Hamano
Re: git-svnimport
Michal Sojka
[PATCHv5 1/2] filter-branch: Fix to allow replacing submodules with another content
Junio C Hamano
Re: Fwd: git status options feature suggestion
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
Gerrit Renker
[PATCH 1/5] dccp: Initialisation framework for feature negotiation
Ursula Braun
[patch 2/8] [PATCH] af_iucv: sync sk shutdown flag if iucv path is quiesced
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
git-commits-head
:
Linux Kernel Mailing List
ARM: S3C64XX: DMA: Callback with correct buffer pointer
Linux Kernel Mailing List
sata_mv: drop unncessary EH callback resetting
Linux Kernel Mailing List
timer: Try to survive timer callback preempt_count leak
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
openbsd-misc
:
Rene Maroufi
smtpd: Aliases only work with for local alias aliases
Stephen J. Bevan
GRE over IPsec
Christophe Rioux
Implementation example of snmp
Darrin Chandler
Re: strange output on openbsd C code
Nick Holland
Re: booting openbsd on eee without cd-rom
Colocation donated by:
Syndicate