linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] genirq: fix incorrect proc spurious output
@ 2010-11-30  8:36 Kenji Kaneshige
  2010-11-30  9:08 ` Yong Zhang
  2010-12-01  7:45 ` [tip:irq/urgent] genirq: Fix " tip-bot for Kenji Kaneshige
  0 siblings, 2 replies; 5+ messages in thread
From: Kenji Kaneshige @ 2010-11-30  8:36 UTC (permalink / raw)
  To: tglx, linux-kernel

Fix the problem that all the /proc/irq/XX/spurious files shows the IRQ
0 information.

Current irq_spurious_proc_open() passes on NULL as the 3rd argument,
which is used as an IRQ number in irq_spurious_proc_show(), to the
single_open(). Because of this, all the /proc/irq/XX/spurious file
shows IRQ 0 information regardless of the IRQ number.

To fix the problem, irq_spurious_proc_open() must pass on the
appropreate data (IRQ number) to single_open().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

---
 kernel/irq/proc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-next-20101125/kernel/irq/proc.c
===================================================================
--- linux-next-20101125.orig/kernel/irq/proc.c
+++ linux-next-20101125/kernel/irq/proc.c
@@ -214,7 +214,7 @@ static int irq_spurious_proc_show(struct
 
 static int irq_spurious_proc_open(struct inode *inode, struct file *file)
 {
-	return single_open(file, irq_spurious_proc_show, NULL);
+	return single_open(file, irq_spurious_proc_show, PDE(inode)->data);
 }
 
 static const struct file_operations irq_spurious_proc_fops = {


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

* Re: [PATCH] genirq: fix incorrect proc spurious output
  2010-11-30  8:36 [PATCH] genirq: fix incorrect proc spurious output Kenji Kaneshige
@ 2010-11-30  9:08 ` Yong Zhang
  2010-11-30 10:07   ` Alexey Dobriyan
  2010-12-01  7:45 ` [tip:irq/urgent] genirq: Fix " tip-bot for Kenji Kaneshige
  1 sibling, 1 reply; 5+ messages in thread
From: Yong Zhang @ 2010-11-30  9:08 UTC (permalink / raw)
  To: Kenji Kaneshige; +Cc: tglx, linux-kernel

2010/11/30 Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>:
> Fix the problem that all the /proc/irq/XX/spurious files shows the IRQ
> 0 information.
>
> Current irq_spurious_proc_open() passes on NULL as the 3rd argument,
> which is used as an IRQ number in irq_spurious_proc_show(), to the
> single_open(). Because of this, all the /proc/irq/XX/spurious file
> shows IRQ 0 information regardless of the IRQ number.
>
> To fix the problem, irq_spurious_proc_open() must pass on the
> appropreate data (IRQ number) to single_open().
>
> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

Looks good.

Reviewed-by: Yong Zhang <yong.zhang0@gmail.com>

BTW, it's introduced by a1afb6371bb5341057056194d1168753f6d77242
So should we Cc'ing stable?

>
> ---
>  kernel/irq/proc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-next-20101125/kernel/irq/proc.c
> ===================================================================
> --- linux-next-20101125.orig/kernel/irq/proc.c
> +++ linux-next-20101125/kernel/irq/proc.c
> @@ -214,7 +214,7 @@ static int irq_spurious_proc_show(struct
>
>  static int irq_spurious_proc_open(struct inode *inode, struct file *file)
>  {
> -       return single_open(file, irq_spurious_proc_show, NULL);
> +       return single_open(file, irq_spurious_proc_show, PDE(inode)->data);
>  }
>
>  static const struct file_operations irq_spurious_proc_fops = {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

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

* Re: [PATCH] genirq: fix incorrect proc spurious output
  2010-11-30  9:08 ` Yong Zhang
@ 2010-11-30 10:07   ` Alexey Dobriyan
  2010-12-01  5:26     ` Kenji Kaneshige
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey Dobriyan @ 2010-11-30 10:07 UTC (permalink / raw)
  To: Yong Zhang; +Cc: Kenji Kaneshige, tglx, linux-kernel

On Tue, Nov 30, 2010 at 05:08:13PM +0800, Yong Zhang wrote:
> 2010/11/30 Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>:
> > Fix the problem that all the /proc/irq/XX/spurious files shows the IRQ
> > 0 information.
> >
> > Current irq_spurious_proc_open() passes on NULL as the 3rd argument,
> > which is used as an IRQ number in irq_spurious_proc_show(), to the
> > single_open(). Because of this, all the /proc/irq/XX/spurious file
> > shows IRQ 0 information regardless of the IRQ number.
> >
> > To fix the problem, irq_spurious_proc_open() must pass on the
> > appropreate data (IRQ number) to single_open().
> >
> > Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
> 
> Looks good.
> 
> Reviewed-by: Yong Zhang <yong.zhang0@gmail.com>
> 
> BTW, it's introduced by a1afb6371bb5341057056194d1168753f6d77242
> So should we Cc'ing stable?

Definitely.

> >  static int irq_spurious_proc_open(struct inode *inode, struct file *file)
> >  {
> > -       return single_open(file, irq_spurious_proc_show, NULL);
> > +       return single_open(file, irq_spurious_proc_show, PDE(inode)->data);
> >  }

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

* Re: [PATCH] genirq: fix incorrect proc spurious output
  2010-11-30 10:07   ` Alexey Dobriyan
@ 2010-12-01  5:26     ` Kenji Kaneshige
  0 siblings, 0 replies; 5+ messages in thread
From: Kenji Kaneshige @ 2010-12-01  5:26 UTC (permalink / raw)
  To: Alexey Dobriyan, Yong Zhang; +Cc: tglx, linux-kernel

Thank you for reviewing, Yong, Alexey.
I'll resend the patch with cc:ing stable.

Regards,
Kenji Kaneshige


(2010/11/30 19:07), Alexey Dobriyan wrote:
> On Tue, Nov 30, 2010 at 05:08:13PM +0800, Yong Zhang wrote:
>> 2010/11/30 Kenji Kaneshige<kaneshige.kenji@jp.fujitsu.com>:
>>> Fix the problem that all the /proc/irq/XX/spurious files shows the IRQ
>>> 0 information.
>>>
>>> Current irq_spurious_proc_open() passes on NULL as the 3rd argument,
>>> which is used as an IRQ number in irq_spurious_proc_show(), to the
>>> single_open(). Because of this, all the /proc/irq/XX/spurious file
>>> shows IRQ 0 information regardless of the IRQ number.
>>>
>>> To fix the problem, irq_spurious_proc_open() must pass on the
>>> appropreate data (IRQ number) to single_open().
>>>
>>> Signed-off-by: Kenji Kaneshige<kaneshige.kenji@jp.fujitsu.com>
>>
>> Looks good.
>>
>> Reviewed-by: Yong Zhang<yong.zhang0@gmail.com>
>>
>> BTW, it's introduced by a1afb6371bb5341057056194d1168753f6d77242
>> So should we Cc'ing stable?
> 
> Definitely.
> 
>>>   static int irq_spurious_proc_open(struct inode *inode, struct file *file)
>>>   {
>>> -       return single_open(file, irq_spurious_proc_show, NULL);
>>> +       return single_open(file, irq_spurious_proc_show, PDE(inode)->data);
>>>   }
> 
> 



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

* [tip:irq/urgent] genirq: Fix incorrect proc spurious output
  2010-11-30  8:36 [PATCH] genirq: fix incorrect proc spurious output Kenji Kaneshige
  2010-11-30  9:08 ` Yong Zhang
@ 2010-12-01  7:45 ` tip-bot for Kenji Kaneshige
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Kenji Kaneshige @ 2010-12-01  7:45 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, yong.zhang0, kaneshige.kenji, tglx

Commit-ID:  25c9170ed64a6551beefe9315882f754e14486f4
Gitweb:     http://git.kernel.org/tip/25c9170ed64a6551beefe9315882f754e14486f4
Author:     Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
AuthorDate: Tue, 30 Nov 2010 17:36:08 +0900
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 1 Dec 2010 08:44:26 +0100

genirq: Fix incorrect proc spurious output

Since commit a1afb637(switch /proc/irq/*/spurious to seq_file) all
/proc/irq/XX/spurious files show the information of irq 0.

Current irq_spurious_proc_open() passes on NULL as the 3rd argument,
which is used as an IRQ number in irq_spurious_proc_show(), to the
single_open(). Because of this, all the /proc/irq/XX/spurious file
shows IRQ 0 information regardless of the IRQ number.

To fix the problem, irq_spurious_proc_open() must pass on the
appropreate data (IRQ number) to single_open().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Reviewed-by: Yong Zhang <yong.zhang0@gmail.com>
LKML-Reference: <4CF4B778.90604@jp.fujitsu.com>
Cc: stable@kernel.org [2.6.33+]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 kernel/irq/proc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 01b1d3a..6c8a2a9 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -214,7 +214,7 @@ static int irq_spurious_proc_show(struct seq_file *m, void *v)
 
 static int irq_spurious_proc_open(struct inode *inode, struct file *file)
 {
-	return single_open(file, irq_spurious_proc_show, NULL);
+	return single_open(file, irq_spurious_proc_show, PDE(inode)->data);
 }
 
 static const struct file_operations irq_spurious_proc_fops = {

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

end of thread, other threads:[~2010-12-01  7:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-30  8:36 [PATCH] genirq: fix incorrect proc spurious output Kenji Kaneshige
2010-11-30  9:08 ` Yong Zhang
2010-11-30 10:07   ` Alexey Dobriyan
2010-12-01  5:26     ` Kenji Kaneshige
2010-12-01  7:45 ` [tip:irq/urgent] genirq: Fix " tip-bot for Kenji Kaneshige

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).