xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: Tim Deegan <Tim.Deegan@citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] pci_remove_device: fix linked list discipline
Date: Fri, 20 May 2011 16:41:55 +0100	[thread overview]
Message-ID: <4DD6A7E302000078000428AA@vpn.id2.novell.com> (raw)
In-Reply-To: <7b12c46b18777655c8a5.1305708795@whitby.uk.xensource.com>

>>> On 18.05.11 at 10:53, Tim Deegan <Tim.Deegan@citrix.com> wrote:
> # HG changeset patch
> # User Tim Deegan <Tim.Deegan@citrix.com>
> # Date 1305708740 -3600
> # Node ID 7b12c46b18777655c8a5f8290286f5699c77c335
> # Parent  f531ed84b0661aa6863dc86d5e5638642bc47301
> pci_remove_device: fix linked list discipline
> 
> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
> 
> diff -r f531ed84b066 -r 7b12c46b1877 xen/drivers/passthrough/pci.c
> --- a/xen/drivers/passthrough/pci.c	Tue May 17 17:32:19 2011 +0100
> +++ b/xen/drivers/passthrough/pci.c	Wed May 18 09:52:20 2011 +0100
> @@ -173,11 +173,11 @@ out:
>  
>  int pci_remove_device(u8 bus, u8 devfn)
>  {
> -    struct pci_dev *pdev;
> +    struct pci_dev *pdev, *tmp;
>      int ret = -ENODEV;
>  
>      spin_lock(&pcidevs_lock);
> -    list_for_each_entry ( pdev, &alldevs_list, alldevs_list )
> +    list_for_each_entry_safe ( pdev, tmp, &alldevs_list, alldevs_list )

Somehow I overlooked this patch when it was sent - looking at the
code it modifies I can't see why the ..._safe() variant is necessary
here, as there's a break statement following the list deletion.

Jan

>          if ( pdev->bus == bus && pdev->devfn == devfn )
>          {
>              ret = iommu_remove_device(pdev);
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com 
> http://lists.xensource.com/xen-devel 

  reply	other threads:[~2011-05-20 15:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18  8:53 [PATCH] pci_remove_device: fix linked list discipline Tim Deegan
2011-05-20 15:41 ` Jan Beulich [this message]
2011-05-23  9:55   ` Tim Deegan
2011-05-23 12:54     ` [PATCH] " Tim Deegan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DD6A7E302000078000428AA@vpn.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=Tim.Deegan@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).