]> nv-tegra.nvidia Code Review - linux-3.10.git/commitdiff
genirq: Fix spurious irq seqfile conversion
authorThomas Gleixner <tglx@linutronix.de>
Fri, 20 Nov 2009 10:46:21 +0000 (11:46 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 20 Nov 2009 10:55:26 +0000 (11:55 +0100)
single_open data argument must be PDE(inode)->data instead of NULL
otherwise seq_file->private is always NULL and we always read the
spurious data of irq 0.

Reported-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/proc.c

index 4e47f11da6a7a09618919f592f93606d9e95746f..0832145fea977546db87a1b69887c9b24a685b8c 100644 (file)
@@ -136,7 +136,7 @@ out:
 
 static int default_affinity_open(struct inode *inode, struct file *file)
 {
-       return single_open(file, default_affinity_show, NULL);
+       return single_open(file, default_affinity_show, PDE(inode)->data);
 }
 
 static const struct file_operations default_affinity_proc_fops = {