Re: [RFC PATCH v3] ARM: imx: Add basic imx6q thermal management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 18, 2012 at 05:40:02AM -0600, Rob Lee wrote:
> > +       /* In the rarest of cases, order matters here - resume goes first */
> > +       th_zone->therm_dev->device.class->resume = imx6q_thermal_resume;
> > +       th_zone->therm_dev->device.class->suspend = imx6q_thermal_suspend;
> On second thought, I should have barrier between these two statements
> to guarantee order.  I think mb() would be ok.

Err, no.  This is a serious bug.

You're writing to this structure:

static struct class thermal_class = {
        .name = "thermal",
        .dev_release = thermal_release,
};

in thermal_sys.c, which would be shared with other thermal drivers.  This
is far from safe - it's insane.

The ordering or mb() is the least of your problems.

If there isn't suspend/resume support provided, please talk to the thermal
people about how to do this.
--
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


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux