Skip to content

Commit

Permalink
genirq: Fix spurious irq seqfile conversion
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Gleixner committed Nov 20, 2009
1 parent a1afb63 commit 3476994
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/irq/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static ssize_t default_affinity_write(struct file *file,

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 = {
Expand Down

0 comments on commit 3476994

Please sign in to comment.