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]
Message-Id: <20070827111802.8d0a675b.akpm@linux-foundation.org>
Date:	Mon, 27 Aug 2007 11:18:02 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Hugh Dickins <hugh@...itas.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fix bogus hotplug cpu warning

On Mon, 27 Aug 2007 16:06:19 +0100 (BST)
Hugh Dickins <hugh@...itas.com> wrote:

> Fix bogus DEBUG_PREEMPT warning on x86_64, when cpu brought online after
> bootup: current_is_keventd is right to note its use of smp_processor_id
> is preempt-safe, but should use raw_smp_processor_id to avoid the warning.
> 
> Signed-off-by: Hugh Dickins <hugh@...itas.com>
> 
> --- 2.6.23-rc3-git10/kernel/workqueue.c	2007-07-26 19:49:58.000000000 +0100
> +++ linux/kernel/workqueue.c	2007-08-26 18:59:16.000000000 +0100
> @@ -635,7 +635,7 @@ int keventd_up(void)
>  int current_is_keventd(void)
>  {
>  	struct cpu_workqueue_struct *cwq;
> -	int cpu = smp_processor_id();	/* preempt-safe: keventd is per-cpu */
> +	int cpu = raw_smp_processor_id(); /* preempt-safe: keventd is per-cpu */
>  	int ret = 0;
>  
>  	BUG_ON(!keventd_wq);

But lib/smp_processor_id.c:debug_smp_processor_id() does

	/*
	 * Kernel threads bound to a single CPU can safely use
	 * smp_processor_id():
	 */
	this_mask = cpumask_of_cpu(this_cpu);

	if (cpus_equal(current->cpus_allowed, this_mask))
		goto out;

So I assume that this warning was triggering because some non-keventd,
non-pinned task is calling current_is_keventd()?


So I agree with the patch, but not with its description.
-
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