RE: [PATCH 1/2] vmd: Fix infinite loop executing irq's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes that's the one it fixes

-----Original Message-----
From: Myron Stowe [mailto:myron.stowe@xxxxxxxxx] 
Sent: Thursday, August 4, 2016 4:48 PM
To: Busch, Keith <keith.busch@xxxxxxxxx>
Cc: linux-pci <linux-pci@xxxxxxxxxxxxxxx>; Bjorn Helgaas <bhelgaas@xxxxxxxxxx>; Derrick, Jonathan <jonathan.derrick@xxxxxxxxx>
Subject: Re: [PATCH 1/2] vmd: Fix infinite loop executing irq's

On Thu, Aug 4, 2016 at 4:09 PM, Keith Busch <keith.busch@xxxxxxxxx> wrote:
> We can't initialize the list head on deletion as this causes the node 
> to point to itself, looping infinitely if the vmd IRQ handler happens 
> to be servicing that node.
>
> The list initialization supposed to fix a bug from multiple calls to 
> disable the same IRQ. We can fix this instead just checking if the 
> previous pointer indicates it was already deleted.
>

Should this have one or possibly more"fixes" lines here?

???Fixes: 97e9230 ("x86/PCI: VMD: Initialize list item in IRQ disable")???

> Signed-off-by: Keith Busch <keith.busch@xxxxxxxxx>
> ---
>  arch/x86/pci/vmd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/pci/vmd.c b/arch/x86/pci/vmd.c index 
> e88b417..2294907 100644
> --- a/arch/x86/pci/vmd.c
> +++ b/arch/x86/pci/vmd.c
> @@ -136,8 +136,8 @@ static void vmd_irq_disable(struct irq_data *data)
>         data->chip->irq_mask(data);
>
>         raw_spin_lock_irqsave(&list_lock, flags);
> -       list_del_rcu(&vmdirq->node);
> -       INIT_LIST_HEAD_RCU(&vmdirq->node);
> +       if (vmdirq->node.prev != LIST_POISON2)
> +               list_del_rcu(&vmdirq->node);
>         raw_spin_unlock_irqrestore(&list_lock, flags);  }
>
> --
> 2.7.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" 
> in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo 
> info at  http://vger.kernel.org/majordomo-info.html
��.n��������+%������w��{.n�����{���"�)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux