All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] correct mis-conversion set_bit() -> __cpumask_set_cpu() by 4aaca0e9cd
@ 2015-02-23 11:06 Jan Beulich
  2015-02-23 11:17 ` Sander Eikelenboom
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jan Beulich @ 2015-02-23 11:06 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian Campbell, Sander Eikelenboom, Keir Fraser, Ian Jackson,
	Tim Deegan

[-- Attachment #1: Type: text/plain, Size: 708 bytes --]

I have no idea how I came to use __cpumask_set_cpu() there, the
conversion should have been set_bit() -> __set_bit(). The wrong
construct results in problems on systems with relatively few CPUs.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/common/softirq.c
+++ b/xen/common/softirq.c
@@ -106,7 +106,7 @@ void cpu_raise_softirq(unsigned int cpu,
     if ( !per_cpu(batching, this_cpu) || in_irq() )
         smp_send_event_check_cpu(cpu);
     else
-        __cpumask_set_cpu(nr, &per_cpu(batch_mask, this_cpu));
+        __set_bit(nr, &per_cpu(batch_mask, this_cpu));
 }
 
 void cpu_raise_softirq_batch_begin(void)




[-- Attachment #2: cpumask-relax-fix.patch --]
[-- Type: text/plain, Size: 775 bytes --]

correct mis-conversion set_bit() -> __cpumask_set_cpu() by 4aaca0e9cd

I have no idea how I came to use __cpumask_set_cpu() there, the
conversion should have been set_bit() -> __set_bit(). The wrong
construct results in problems on systems with relatively few CPUs.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/common/softirq.c
+++ b/xen/common/softirq.c
@@ -106,7 +106,7 @@ void cpu_raise_softirq(unsigned int cpu,
     if ( !per_cpu(batching, this_cpu) || in_irq() )
         smp_send_event_check_cpu(cpu);
     else
-        __cpumask_set_cpu(nr, &per_cpu(batch_mask, this_cpu));
+        __set_bit(nr, &per_cpu(batch_mask, this_cpu));
 }
 
 void cpu_raise_softirq_batch_begin(void)

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-27 10:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-23 11:06 [PATCH] correct mis-conversion set_bit() -> __cpumask_set_cpu() by 4aaca0e9cd Jan Beulich
2015-02-23 11:17 ` Sander Eikelenboom
2015-02-23 12:01 ` Andrew Cooper
2015-02-23 13:47   ` Jan Beulich
2015-02-26 16:53 ` Sander Eikelenboom
2015-02-27  7:33   ` Jan Beulich
2015-02-27 10:34     ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.