aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/proc.c
diff options
context:
space:
mode:
authorJohn Keller <jpk@sgi.com>2007-05-11 01:42:44 -0400
committerTony Luck <tony.luck@intel.com>2007-05-11 12:35:38 -0400
commit25d61578daae697c4a0eb817f42a868af9824f82 (patch)
treeec4ac10132f0b12a822dba6a53d05bab78ec3760 /kernel/irq/proc.c
parent3e3d32770204ea24cf71919a90d9ccfc2bd407dd (diff)
[IA64] SN: validate smp_affinity mask on intr redirect
On SN, only allow one bit to be set in the smp_affinty mask when redirecting an interrupt. Currently setting multiple bits is allowed, but only the first bit is used in determining the CPU to redirect to. This has caused confusion among some customers. [akpm@linux-foundation.org: fixes] Signed-off-by: John Keller <jpk@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'kernel/irq/proc.c')
-rw-r--r--kernel/irq/proc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index ddde0ef9ccdc..b4f1674fca79 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -27,6 +27,10 @@ static int irq_affinity_read_proc(char *page, char **start, off_t off,
27 return len; 27 return len;
28} 28}
29 29
30#ifndef is_affinity_mask_valid
31#define is_affinity_mask_valid(val) 1
32#endif
33
30int no_irq_affinity; 34int no_irq_affinity;
31static int irq_affinity_write_proc(struct file *file, const char __user *buffer, 35static int irq_affinity_write_proc(struct file *file, const char __user *buffer,
32 unsigned long count, void *data) 36 unsigned long count, void *data)
@@ -42,6 +46,9 @@ static int irq_affinity_write_proc(struct file *file, const char __user *buffer,
42 if (err) 46 if (err)
43 return err; 47 return err;
44 48
49 if (!is_affinity_mask_valid(new_value))
50 return -EINVAL;
51
45 /* 52 /*
46 * Do not allow disabling IRQs completely - it's a too easy 53 * Do not allow disabling IRQs completely - it's a too easy
47 * way to make the system unusable accidentally :-) At least 54 * way to make the system unusable accidentally :-) At least