2013-09-06 06:39:31

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH] VMCI: fix to pass correct device identity to free_irq()

From: Wei Yongjun <[email protected]>

free_irq() expects the same device identity that was passed to
corresponding request_irq(), otherwise the IRQ is not freed.

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/misc/vmw_vmci/vmci_guest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/vmw_vmci/vmci_guest.c b/drivers/misc/vmw_vmci/vmci_guest.c
index b3a2b76..c98b03b 100644
--- a/drivers/misc/vmw_vmci/vmci_guest.c
+++ b/drivers/misc/vmw_vmci/vmci_guest.c
@@ -649,7 +649,7 @@ static int vmci_guest_probe_device(struct pci_dev *pdev,
return 0;

err_free_irq:
- free_irq(vmci_dev->irq, &vmci_dev);
+ free_irq(vmci_dev->irq, vmci_dev);
tasklet_kill(&vmci_dev->datagram_tasklet);
tasklet_kill(&vmci_dev->bm_tasklet);


2013-09-06 06:55:58

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] VMCI: fix to pass correct device identity to free_irq()

On Fri, Sep 06, 2013 at 02:39:28PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> free_irq() expects the same device identity that was passed to
> corresponding request_irq(), otherwise the IRQ is not freed.
>
> Signed-off-by: Wei Yongjun <[email protected]>

Acked-by: Dmitry Torokhov <[email protected]>

> ---
> drivers/misc/vmw_vmci/vmci_guest.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/vmw_vmci/vmci_guest.c b/drivers/misc/vmw_vmci/vmci_guest.c
> index b3a2b76..c98b03b 100644
> --- a/drivers/misc/vmw_vmci/vmci_guest.c
> +++ b/drivers/misc/vmw_vmci/vmci_guest.c
> @@ -649,7 +649,7 @@ static int vmci_guest_probe_device(struct pci_dev *pdev,
> return 0;
>
> err_free_irq:
> - free_irq(vmci_dev->irq, &vmci_dev);
> + free_irq(vmci_dev->irq, vmci_dev);
> tasklet_kill(&vmci_dev->datagram_tasklet);
> tasklet_kill(&vmci_dev->bm_tasklet);
>

2013-09-06 14:22:16

by Andy King

[permalink] [raw]
Subject: Re: [PATCH] VMCI: fix to pass correct device identity to free_irq()

> free_irq() expects the same device identity that was passed to
> corresponding request_irq(), otherwise the IRQ is not freed.
>
> Signed-off-by: Wei Yongjun <[email protected]>

Acked-by: Andy King <[email protected]>

Thanks for fixing this!
- Andy