[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ1PR11MB6083DF5A4E9265504AF7C339FC512@SJ1PR11MB6083.namprd11.prod.outlook.com>
Date: Mon, 4 Nov 2024 20:16:58 +0000
From: "Luck, Tony" <tony.luck@...el.com>
To: Orange Kao <orange@...en.io>, "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
CC: "bp@...en8.de" <bp@...en8.de>, "james.morse@....com"
<james.morse@....com>, "orange@...sy.org" <orange@...sy.org>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mchehab@...nel.org" <mchehab@...nel.org>, "rric@...nel.org"
<rric@...nel.org>
Subject: RE: [PATCH 1/3] EDAC/igen6: Avoid segmentation fault when rmmod
> The segmentation fault happens because
>
> During modprobe:
> 1. In igen6_probe(), igen6_pvt will be allocated with kzalloc()
> 2. In igen6_register_mci(), mci->pvt_info will point to
> &igen6_pvt->imc[mc]
>
> During rmmod:
> 1. In mci_release() in edac_mc.c, it will kfree(mci->pvt_info)
> 2. In igen6_remove(), it will kfree(igen6_pvt);
>
> Fix this issue by setting mci->pvt_info to NULL to avoid the double
> kfree.
>
> Fixes: 10590a9d4f23 ("EDAC/igen6: Add EDAC driver for Intel client SoCs using IBECC")
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219360
> Signed-off-by: Orange Kao <orange@...en.io>
I've applied this patch to the ras tree. Thanks.
Patches 2 & 3 are on hold waiting for an answer to Boris' question
on whether polling mode can be applied automatically on systems
that need it. Rather than pushing the burden onto the user to use the
module parameter to select it.
-Tony
Powered by blists - more mailing lists