* [PATCH] sfc: initialize dynamic sysfs attributes for lockdep
@ 2012-07-19 17:04 Michal Schmidt
2012-07-19 17:19 ` Ben Hutchings
0 siblings, 1 reply; 3+ messages in thread
From: Michal Schmidt @ 2012-07-19 17:04 UTC (permalink / raw)
To: netdev; +Cc: Ben Hutchings, Solarflare linux maintainers
Dynamically allocated sysfs attributes must be initialized using
sysfs_attr_init(), otherwise lockdep complains:
BUG: key <address> not in .data!
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
drivers/net/ethernet/sfc/mcdi_mon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/sfc/mcdi_mon.c b/drivers/net/ethernet/sfc/mcdi_mon.c
index fb7f65b..1d552f0 100644
--- a/drivers/net/ethernet/sfc/mcdi_mon.c
+++ b/drivers/net/ethernet/sfc/mcdi_mon.c
@@ -222,6 +222,7 @@ efx_mcdi_mon_add_attr(struct efx_nic *efx, const char *name,
attr->index = index;
attr->type = type;
attr->limit_value = limit_value;
+ sysfs_attr_init(&attr->dev_attr.attr);
attr->dev_attr.attr.name = attr->name;
attr->dev_attr.attr.mode = S_IRUGO;
attr->dev_attr.show = reader;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sfc: initialize dynamic sysfs attributes for lockdep
2012-07-19 17:04 [PATCH] sfc: initialize dynamic sysfs attributes for lockdep Michal Schmidt
@ 2012-07-19 17:19 ` Ben Hutchings
2012-07-19 17:51 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2012-07-19 17:19 UTC (permalink / raw)
To: Michal Schmidt; +Cc: netdev, Solarflare linux maintainers
On Thu, 2012-07-19 at 19:04 +0200, Michal Schmidt wrote:
> Dynamically allocated sysfs attributes must be initialized using
> sysfs_attr_init(), otherwise lockdep complains:
> BUG: key <address> not in .data!
>
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> drivers/net/ethernet/sfc/mcdi_mon.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/sfc/mcdi_mon.c b/drivers/net/ethernet/sfc/mcdi_mon.c
> index fb7f65b..1d552f0 100644
> --- a/drivers/net/ethernet/sfc/mcdi_mon.c
> +++ b/drivers/net/ethernet/sfc/mcdi_mon.c
> @@ -222,6 +222,7 @@ efx_mcdi_mon_add_attr(struct efx_nic *efx, const char *name,
> attr->index = index;
> attr->type = type;
> attr->limit_value = limit_value;
> + sysfs_attr_init(&attr->dev_attr.attr);
> attr->dev_attr.attr.name = attr->name;
> attr->dev_attr.attr.mode = S_IRUGO;
> attr->dev_attr.show = reader;
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sfc: initialize dynamic sysfs attributes for lockdep
2012-07-19 17:19 ` Ben Hutchings
@ 2012-07-19 17:51 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-07-19 17:51 UTC (permalink / raw)
To: bhutchings; +Cc: mschmidt, netdev, linux-net-drivers
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 19 Jul 2012 18:19:05 +0100
> On Thu, 2012-07-19 at 19:04 +0200, Michal Schmidt wrote:
>> Dynamically allocated sysfs attributes must be initialized using
>> sysfs_attr_init(), otherwise lockdep complains:
>> BUG: key <address> not in .data!
>>
>> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
>
> Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-19 17:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-19 17:04 [PATCH] sfc: initialize dynamic sysfs attributes for lockdep Michal Schmidt
2012-07-19 17:19 ` Ben Hutchings
2012-07-19 17:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).