Re: [PATCH] i7core_edac: fix panic in udimm sysfs attributes registration

From: Doug Thompson
Date: Wed Sep 15 2010 - 17:26:57 EST




--- On Tue, 9/14/10, Marcin Slusarz <marcin.slusarz@xxxxxxxxx> wrote:

> From: Marcin Slusarz <marcin.slusarz@xxxxxxxxx>
> Subject: [PATCH] i7core_edac: fix panic in udimm sysfs attributes registration
> To: "Mauro Carvalho Chehab" <mchehab@xxxxxxxxxx>
> Cc: "LKML" <linux-kernel@xxxxxxxxxxxxxxx>, linux-edac@xxxxxxxxxxxxxxx
> Date: Tuesday, September 14, 2010, 10:26 AM
> Array of udimm sysfs attributes was
> not ended with NULL marker.
>
> EDAC DEBUG: edac_create_mci_instance_attributes:
> edac_create_mci_instance_attributes() file udimm0
> EDAC DEBUG: edac_create_mci_instance_attributes:
> edac_create_mci_instance_attributes() file udimm1
> EDAC DEBUG: edac_create_mci_instance_attributes:
> edac_create_mci_instance_attributes() file udimm2
> BUG: unable to handle kernel NULL pointer dereference at
> 00000000000001a4
> IP: [<ffffffff81330b36>]
> edac_create_mci_instance_attributes+0x148/0x1f1
> PGD 0
> Oops: 0000 [#1] PREEMPT SMP
> last sysfs file:
> CPU 3
> Modules linked in:
>

> Kernel panic - not syncing: Attempted to kill init!
>
> Signed-off-by: Marcin Slusarz <marcin.slusarz@xxxxxxxxx>
> Cc: stable@xxxxxxxxxx
> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>

Acked-by: Doug Thompson <dougthompson@xxxxxxxxxxxx>


> ---
> drivers/edac/i7core_edac.c |    1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/edac/i7core_edac.c
> b/drivers/edac/i7core_edac.c
> index e0187d1..0fd5b85 100644
> --- a/drivers/edac/i7core_edac.c
> +++ b/drivers/edac/i7core_edac.c
> @@ -1140,6 +1140,7 @@ static struct mcidev_sysfs_attribute
> i7core_udimm_counters_attrs[] = {
>     ATTR_COUNTER(0),
>     ATTR_COUNTER(1),
>     ATTR_COUNTER(2),
> +    { .attr = { .name = NULL } }
> };
>
> static struct mcidev_sysfs_group i7core_udimm_counters =
> {
> --
> 1.7.2.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/