[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20110329163105.GD22419@aftab>
Date: Tue, 29 Mar 2011 18:31:05 +0200
From: Borislav Petkov <bp@...64.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mauro Carvalho Chehab <mchehab@...hat.com>,
edac-devel <linux-edac@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [GIT PULL] amd64_edac last minute fix
Hi Linus,
please pull this last-minute amd64_edac fix for a potential memleak if
it's not too late yet. If it is, I'll send it to you after -rc1 is out
since it is a minor bugfix.
Thanks.
The following changes since commit 89078d572eb9ce8d4c04264b8b0ba86de0d74c8f:
md: Fix integrity registration error when no devices are capable (2011-03-28 17:53:29 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git for-linus
Borislav Petkov (1):
amd64_edac: Fix potential memleak
drivers/edac/amd64_edac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--
commit a9f0fbe2bbf328f869fc5ee5a12c6a4118c32689
Author: Borislav Petkov <borislav.petkov@....com>
Date: Tue Mar 29 18:10:53 2011 +0200
amd64_edac: Fix potential memleak
We check the pointers together but at least one of them could be invalid
due to failed allocation. Since we cannot continue if either of the two
allocations has failed, exit early by freeing them both.
Cc: <stable@...nel.org> # 38.x
Reported-by: Mauro Carvalho Chehab <mchehab@...hat.com>
Signed-off-by: Borislav Petkov <borislav.petkov@....com>
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 0be30e9..31e71c4f 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2679,7 +2679,7 @@ static int __init amd64_edac_init(void)
mcis = kzalloc(amd_nb_num() * sizeof(mcis[0]), GFP_KERNEL);
ecc_stngs = kzalloc(amd_nb_num() * sizeof(ecc_stngs[0]), GFP_KERNEL);
if (!(mcis && ecc_stngs))
- goto err_ret;
+ goto err_free;
msrs = msrs_alloc();
if (!msrs)
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists