Skip to contentSkip to conversation

powerpc/perf/24x7: Fix lockdep warning

PATCH Applied Sukadev Bhattiprolu 3 participants 3 messages Jul 7, 2015 – Jul 8, 2015 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/perf/24x7: Fix lockdep warning

Quoted 1 line

From 370152d9427e57cd9632b00189f71099f8e85544 Mon Sep 17 00:00:00 2001

From: Sukadev Bhattiprolu <[email protected]>
Date: Tue, 7 Jul 2015 12:21:10 -0400
Subject: [PATCH 1/1] powerpc/perf/24x7: Fix lockdep warning

The sysfs attributes for the 24x7 counters are dynamically allocated. Initialize the attributes using sysfs_attr_init() to fix following warning which occurs when CONFIG_DEBUG_LOCK_VMALLOC=y.

[    0.346249] audit: initializing netlink subsys (disabled)
[    0.346284] audit: type=2000 audit(1436295254.340:1): initialized
[    0.346489] BUG: key c0000000efe90198 not in .data!
[    0.346491] DEBUG_LOCKS_WARN_ON(1)
[    0.346502] ------------[ cut here ]------------
[    0.346504] WARNING: at ../kernel/locking/lockdep.c:3002
[    0.346506] Modules linked in:
---
 arch/powerpc/perf/hv-24x7.c | 2 ++
 1 file changed, 2 insertions(+)
arch/powerpc/perf/hv-24x7.c +2 -0
index ec2eb20..df95629 100644
@@ -320,6 +320,8 @@ static struct attribute *device_str_attr_create_(char *name, char *str)
 	if (!attr)
 		return NULL;
 
+	sysfs_attr_init(&attr->attr.attr);
+
 	attr->var = str;
 	attr->attr.attr.name = name;
 	attr->attr.attr.mode = 0444;
Signature · 1 line
1.8.3.1
Tested-by on v1 1/1
#1 lore raw
Quoted 17 lines · Sukadev Bhattiprolu

From 370152d9427e57cd9632b00189f71099f8e85544 Mon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <[email protected]>
Date: Tue, 7 Jul 2015 12:21:10 -0400
Subject: [PATCH 1/1] powerpc/perf/24x7: Fix lockdep warning

The sysfs attributes for the 24x7 counters are dynamically allocated. Initialize the attributes using sysfs_attr_init() to fix following warning which occurs when CONFIG_DEBUG_LOCK_VMALLOC=y.

[    0.346249] audit: initializing netlink subsys (disabled)
[    0.346284] audit: type=2000 audit(1436295254.340:1): initialized
[    0.346489] BUG: key c0000000efe90198 not in .data!
[    0.346491] DEBUG_LOCKS_WARN_ON(1)
[    0.346502] ------------[ cut here ]------------
[    0.346504] WARNING: at ../kernel/locking/lockdep.c:3002
[    0.346506] Modules linked in:
Quoted 2 lines

I verified that it fixes a BUG splat on PowerVM (tested on little endian).

[]'s
Gustavo

reviewer Applied
#2 lore raw
In reply to Sukadev Bhattiprolu
Quoted 17 lines · Sukadev Bhattiprolu
Quoted 1 line

From 370152d9427e57cd9632b00189f71099f8e85544 Mon Sep 17 00:00:00 2001

From: Sukadev Bhattiprolu <[email protected]>
Date: Tue, 7 Jul 2015 12:21:10 -0400
Subject: [PATCH 1/1] powerpc/perf/24x7: Fix lockdep warning

The sysfs attributes for the 24x7 counters are dynamically allocated. Initialize the attributes using sysfs_attr_init() to fix following warning which occurs when CONFIG_DEBUG_LOCK_VMALLOC=y.

[    0.346249] audit: initializing netlink subsys (disabled)
[    0.346284] audit: type=2000 audit(1436295254.340:1): initialized
[    0.346489] BUG: key c0000000efe90198 not in .data!
[    0.346491] DEBUG_LOCKS_WARN_ON(1)
[    0.346502] ------------[ cut here ]------------
[    0.346504] WARNING: at ../kernel/locking/lockdep.c:3002
[    0.346506] Modules linked in:
Quoted 3 lines

Applied to powerpc fixes, thanks.

https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?h=fixes&id=442053e57a4fc58b719b6ceab60f29ef9cf4404c

cheers