All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Mohr <andi@lisas.de>
To: Zhang Rui <rui.zhang@intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: [ASAP] thermal_sys.c NULL ptr deref patch likely incomplete
Date: Thu, 14 Feb 2013 15:44:04 +0100	[thread overview]
Message-ID: <20130214144404.GA20011@rhlx01.hs-esslingen.de> (raw)

Hi,

I just had a

# cat /sys/class/thermal/thermal_zone0/policy 
(null)


When looking at the code (on my -rc7), I saw:

drivers/thermal/thermal_sys.c

static ssize_t
policy_show(struct device *dev, struct device_attribute *devattr, char
*buf)
{
        struct thermal_zone_device *tz = to_thermal_zone(dev);

        return sprintf(buf, "%s\n", tz->governor->name);
}


(not sure though why I manage to get a "(null)" rather than a crash
due to the dereferencing prior to output - possibly since I do have a
valid governor allocated yet then only its name field is null?)


Seems we are missing a critical (and -rc-relevant) patch here
(and perhaps at other locations in this file, too, given that
this one was missed last time?).

Currently trying to get acerhdf operation into a working state
(and having some trouble with it - didn't know that I probably need some
governor setup which seems to have just been available on my last setup,
or so)

Thanks,

Andreas Mohr

             reply	other threads:[~2013-02-14 14:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14 14:44 Andreas Mohr [this message]
2013-02-15  8:34 ` [ASAP] thermal_sys.c NULL ptr deref patch likely incomplete Zhang, Rui
2013-02-15 16:25   ` Andreas Mohr
2013-02-15  9:56 ` Zhang, Rui
2013-02-18 11:48 ` Zhang, Rui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130214144404.GA20011@rhlx01.hs-esslingen.de \
    --to=andi@lisas.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.