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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 22 Sep 2006 07:51:02 +0200
From:	Andi Kleen <ak@...e.de>
To:	Dmitriy Zavin <dmitriyz@...gle.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...l.org
Subject: Re: [PATCH 4/4] therm_throt: Add a cumulative thermal throttle event counter.


> +	preempt_disable();         /* CPU hotplug */
> +	for_each_online_cpu(cpu) {
> +		/* connect live CPUs to sysfs */
> +		thermal_throttle_add_dev(get_cpu_sysdev(cpu));
> +	}
> +	preempt_enable();

There was still one problem in there: sysfs_create_group can 
sleep and that's not ok with preemption disabled.

I changed it to register the notifier first and do the necessary
locking in there using a private lock (that the new akpm-recommended(tm)
way to do this) 

-Andi
-
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