From: "Henrik Rydberg" <rydberg@euromail.se>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>,
lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: Re: 2.6.38-rc1/-2: applesmc lockdep warning
Date: Sat, 22 Jan 2011 21:00:02 +0100 [thread overview]
Message-ID: <20110122200002.GA1677@polaris.bitmath.org> (raw)
In-Reply-To: <20110122134513.1e1d512a@stein>
> BUG: key f4891a1c not in .data!
[...]
> Any ideas where this may come from?
The patch below seems to fix the problem, but a verification would be most
welcome. Gunther, do you want to take it, or should it route it through
my tree?
Thanks,
Henrik
>From 8a7a0641dfe08d3450695552e628a1c2f81b4050 Mon Sep 17 00:00:00 2001
From: Henrik Rydberg <rydberg@euromail.se>
Date: Sat, 22 Jan 2011 20:55:39 +0100
Subject: [PATCH] hwmon: (applesmc) Properly initialize lockdep attributes
The switch to dynamically allocated sysfs attributes left the
internal lockdep members uninitialized, causing a formal bug.
This patch adds sysfs_attr_init() to the node creation function,
remedying the problem.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
drivers/hwmon/applesmc.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index ce0372f..4c07436 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -1072,6 +1072,7 @@ static int applesmc_create_nodes(struct applesmc_node_group *groups, int num)
node->sda.dev_attr.show = grp->show;
node->sda.dev_attr.store = grp->store;
attr = &node->sda.dev_attr.attr;
+ sysfs_attr_init(attr);
attr->name = node->name;
attr->mode = S_IRUGO | (grp->store ? S_IWUSR : 0);
ret = sysfs_create_file(&pdev->dev.kobj, attr);
--
1.7.2.3
next prev parent reply other threads:[~2011-01-22 20:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-22 12:45 2.6.38-rc1/-2: applesmc lockdep warning Stefan Richter
2011-01-22 15:26 ` Henrik Rydberg
2011-01-22 20:00 ` Henrik Rydberg [this message]
2011-01-22 20:40 ` Guenter Roeck
2011-01-22 20:52 ` Henrik Rydberg
2011-01-22 21:18 ` Guenter Roeck
2011-01-22 23:00 ` Stefan Richter
2011-01-23 13:38 ` Henrik Rydberg
2011-01-23 15:30 ` Stefan Richter
2011-01-23 16:55 ` Guenter Roeck
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=20110122200002.GA1677@polaris.bitmath.org \
--to=rydberg@euromail.se \
--cc=guenter.roeck@ericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=stefanr@s5r6.in-berlin.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox