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: <4A67A1D1.8040201@gmail.com>
Date:	Wed, 22 Jul 2009 20:33:37 -0300
From:	Kevin Winchester <kjwinchester@...il.com>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [GIT pull] genirq fixes for 2.6.31

Kevin Winchester wrote:
> Thomas Gleixner wrote:
>> +/*
>>   * Interrupt handler thread
>>   */
>>  static int irq_thread(void *data)
>> @@ -458,6 +494,8 @@ static int irq_thread(void *data)
>>  
>>  	while (!irq_wait_for_interrupt(action)) {
>>  
>> +		irq_thread_check_affinity(desc, action);
>> +
>>  		atomic_inc(&desc->threads_active);
>>  
>>  		spin_lock_irq(&desc->lock);
> 
> Any chance we could do this in a way that doesn't break the build for CONFIG_SMP=n? :)
> 
> Should this call simply be wrapped in an #ifdef, or should the function be defined for !SMP?
> 

Actually, I guess the function is defined always, but it references desc->affinity unconditionally.

Perhaps something like the following (likely whitespace damaged) patch:

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index f0de36f..353e335 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -451,6 +451,8 @@ static int irq_wait_for_interrupt(struct irqaction *action)
        return -1;
 }
 
+#ifdef CONFIG_SMP
+
 /*
  * Check whether we need to change the affinity of the interrupt thread.
  */
@@ -479,6 +481,15 @@ irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action)
        free_cpumask_var(mask);
 }
 
+#else
+
+static void
+irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action)
+{
+}
+
+#endif
+
 /*
  * Interrupt handler thread
  */

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