[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070508121945.3e8d29c1.akpm@linux-foundation.org>
Date: Tue, 8 May 2007 12:19:45 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: "John Keller" <jpk@....com>, <linux-kernel@...r.kernel.org>,
<steiner@....com>, <linux-ia64@...r.kernel.org>
Subject: Re: [PATCH Resend] - SN: validate smp_affinity mask on intr
redirect
On Tue, 8 May 2007 11:03:20 -0700
"Luck, Tony" <tony.luck@...el.com> wrote:
> +#ifndef is_affinity_mask_valid
> +#define is_affinity_mask_valid() 1
> +#endif
> +
> int no_irq_affinity;
> static int irq_affinity_write_proc(struct file *file, const char __user *buffer,
> unsigned long count, void *data)
> @@ -42,6 +46,9 @@ static int irq_affinity_write_proc(struc
> if (err)
> return err;
>
> + if (!is_affinity_mask_valid(new_value))
> + return -EINVAL;
>
> This results in a warning:
> kernel/irq/proc.c:49: warning: implicit declaration of function `is_affinity_mask_valid'
>
It had a dopey little bug:
diff -puN kernel/irq/proc.c~sn-validate-smp_affinity-mask-on-intr-redirect-fix kernel/irq/proc.c
--- a/kernel/irq/proc.c~sn-validate-smp_affinity-mask-on-intr-redirect-fix
+++ a/kernel/irq/proc.c
@@ -28,7 +28,7 @@ static int irq_affinity_read_proc(char *
}
#ifndef is_affinity_mask_valid
-#define is_affinity_mask_valid() 1
+#define is_affinity_mask_valid(val) 1
#endif
int no_irq_affinity;
_
-
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