From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: x86@kernel.org, Hans Rosenfeld <hans.rosenfeld@amd.com>,
Borislav Petkov <borislav.petkov@amd.com>,
Andreas Herrmann <andreas.herrmann3@amd.com>,
Mike Travis <travis@sgi.com>
Subject: [patch 1/3] x86: cache_info: Remove bogus free of amd_l3_cache data
Date: Sun, 24 Jul 2011 09:46:08 -0000 [thread overview]
Message-ID: <20110723212626.550539989@linutronix.de> (raw)
In-Reply-To: 20110723212603.517924252@linutronix.de
[-- Attachment #1: x86-amd-remove-bogus-free.patch --]
[-- Type: text/plain, Size: 1195 bytes --]
free_cache_attributes() kfree's:
per_cpu(ici_cpuid4_info, cpu)->l3
which is a pointer to memory which was allocated as a block in
amd_init_l3_cache(). l3 of a particular cpu points to a part of this
memory blob. The part and the rest of the blob are still referenced by
other cpus.
As far as I can tell from the git history this is a leftover from the
conversion from per cpu to node data with commit ba06edb63(x86,
cacheinfo: Make L3 cache info per node) and the following commit
f658bcfb2(x86, cacheinfo: Cleanup L3 cache index disable support)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/cpu/intel_cacheinfo.c | 1 -
1 file changed, 1 deletion(-)
Index: linux-2.6/arch/x86/kernel/cpu/intel_cacheinfo.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ linux-2.6/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -820,7 +820,6 @@ static void __cpuinit free_cache_attribu
for (i = 0; i < num_cache_leaves; i++)
cache_remove_shared_cpu_map(cpu, i);
- kfree(per_cpu(ici_cpuid4_info, cpu)->l3);
kfree(per_cpu(ici_cpuid4_info, cpu));
per_cpu(ici_cpuid4_info, cpu) = NULL;
}
next prev parent reply other threads:[~2011-07-24 9:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-24 9:46 [patch 0/3] x86: cache_info: Bugfix and cleanups AMD_NB related Thomas Gleixner
2011-07-24 9:46 ` [patch 2/3] x86: cache_info: Kill the moronic shadow struct Thomas Gleixner
2011-07-24 9:46 ` Thomas Gleixner [this message]
2011-07-24 9:46 ` [patch 3/3] x86: cache_info: Kill the atomic allocation in amd_init_l3_cache() Thomas Gleixner
2011-07-24 10:27 ` Borislav Petkov
2011-07-24 16:13 ` Thomas Gleixner
2011-07-26 17:04 ` Borislav Petkov
2011-09-19 21:44 ` [patch 0/3] x86: cache_info: Bugfix and cleanups AMD_NB related Borislav Petkov
2011-09-20 8:35 ` Thomas Gleixner
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=20110723212626.550539989@linutronix.de \
--to=tglx@linutronix.de \
--cc=andreas.herrmann3@amd.com \
--cc=borislav.petkov@amd.com \
--cc=hans.rosenfeld@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=travis@sgi.com \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox