[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120229101146.GB21224@aftab>
Date: Wed, 29 Feb 2012 11:11:46 +0100
From: Borislav Petkov <bp@...64.org>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: Ingo Molnar <mingo@...e.hu>,
EDAC devel <linux-edac@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Borislav Petkov <borislav.petkov@....com>
Subject: Re: [PATCH 2/3] x86, RAS: Add a decoded msg buffer
On Tue, Feb 28, 2012 at 10:43:52PM +0000, Luck, Tony wrote:
> + if (left <= 50) {
> + /* enlarge arbitrarily by 50 chars */
> + err_str_sz += 50;
> + left += 50;
> +
> + err_str = krealloc(err_str, err_str_sz, GFP_KERNEL);
> + if (!err_str) {
> + pr_err("Error enlarging decode buffer.\n");
> + return;
> + }
> + }
>
> This looks worrying to me. Some bad stuff has happened, we are perhaps
> in machine check context, and you want to start allocating memory!
Yes, absolutely. See my other mail to Seto-san.
> Is there some upper bound for how long this string can get? Why not
> just allocate a generous amount at boot time?
Yep, this sounds like the easiest thing to do, let me play with MCE
injection a bit.
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
--
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