On Tue, Apr 27, 2010 at 02:01:07PM -0700, akpm@xxxxxxxxxxxxxxxxxxxx wrote: > From: Dan Carpenter <error27@xxxxxxxxx> > > acpi_device_class can only be 19 characters and a NULL terminator. > > The current code has a buffer overflow in acpi_power_meter_add(): > strcpy(acpi_device_class(device), ACPI_POWER_METER_CLASS); > > Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> > Cc: Len Brown <lenb@xxxxxxxxxx> > Cc: "Darrick J. Wong" <djwong@xxxxxxxxxx> > Cc: <stable@xxxxxxxxxx> > Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Looks ok to me, so: Acked-by: Darrick J. Wong <djwong@xxxxxxxxxx> > --- > > drivers/acpi/power_meter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -puN drivers/acpi/power_meter.c~power_meter-acpi_device_class-power_meter_resource-too-long drivers/acpi/power_meter.c > --- a/drivers/acpi/power_meter.c~power_meter-acpi_device_class-power_meter_resource-too-long > +++ a/drivers/acpi/power_meter.c > @@ -35,7 +35,7 @@ > #define ACPI_POWER_METER_NAME "power_meter" > ACPI_MODULE_NAME(ACPI_POWER_METER_NAME); > #define ACPI_POWER_METER_DEVICE_NAME "Power Meter" > -#define ACPI_POWER_METER_CLASS "power_meter_resource" > +#define ACPI_POWER_METER_CLASS "pwr_meter_resource" > > #define NUM_SENSORS 17 > > _ -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html