lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 03 Mar 2011 16:31:05 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	Stephane Eranian <eranian@...gle.com>
CC:	Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <peterz@...radead.org>,
	Jason Baron <jbaron@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [BUG] lock issue in perf cgroup with jump label enabled

With CONFIG_JUMP_LABEL enabled:

# mount -t cgroup -o perf_event xxx /mnt
# mkdir /mnt/test
# ./perf stat -B -a -e cycles:u -G test -- sleep 1

lockdep warning will be triggered immediately, and the machine
will become unresponsive.

I guess this is the culprit?

In the "perf cgroup support" patch:

@@ -419,6 +781,17 @@ list_add_event(struct perf_event *event, struct perf_event_con
                list_add_tail(&event->group_entry, list);
        }
 
+       if (is_cgroup_event(event)) {
+               ctx->nr_cgroups++;
+               /*
+                * one more event:
+                * - that has cgroup constraint on event->cpu
+                * - that may need work on context switch
+                */
+               atomic_inc(&per_cpu(perf_cgroup_events, event->cpu));
+               jump_label_inc(&perf_sched_events);
+       }

list_add_event() is called with spin lock ctl->lock held,  while
jump_label_inc() will acquire jump_label_mutex..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ