From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Keir Fraser <keir@xen.org>,
Kristoffer Egefelt <kristoffer@itoc.dk>
Subject: Re: [PATCH] x86/MSI: fix locking in pci_restore_msi_state()
Date: Fri, 11 Oct 2013 10:02:43 +0100 [thread overview]
Message-ID: <5257BEB3.2070703@citrix.com> (raw)
In-Reply-To: <5257D70202000078000FA775@nat28.tlf.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1075 bytes --]
On 11/10/2013 09:46, Jan Beulich wrote:
> Right after the loop the lock is being dropped, so all loop exits
> should happen with the lock still held.
>
> Reported-by: Kristoffer Egefelt <kristoffer@itoc.dk>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> Tested-by: Kristoffer Egefelt <kristoffer@itoc.dk>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> --- a/xen/arch/x86/msi.c
> +++ b/xen/arch/x86/msi.c
> @@ -1158,11 +1158,11 @@ int pci_restore_msi_state(struct pci_dev
> for ( i = 0; ; )
> {
> msi_set_mask_bit(desc, entry[i].msi_attrib.masked);
> - spin_unlock_irqrestore(&desc->lock, flags);
>
> if ( !--nr )
> break;
>
> + spin_unlock_irqrestore(&desc->lock, flags);
> desc = &irq_desc[entry[++i].irq];
> spin_lock_irqsave(&desc->lock, flags);
> if ( desc->msi_desc != entry + i )
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
[-- Attachment #1.2: Type: text/html, Size: 2135 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2013-10-11 9:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 8:46 [PATCH] x86/MSI: fix locking in pci_restore_msi_state() Jan Beulich
2013-10-11 9:02 ` Andrew Cooper [this message]
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=5257BEB3.2070703@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=kristoffer@itoc.dk \
--cc=xen-devel@lists.xenproject.org \
/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).