linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Hans J. Koch" <hjk@hansjkoch.de>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH v2 1/3] pci: Rework config space blocking services
Date: Mon, 5 Dec 2011 11:06:23 -0800	[thread overview]
Message-ID: <20111205110623.0eeaa2ec@jbarnes-desktop> (raw)
In-Reply-To: <693bbd2bcf55f839d6dc4b7b002dd1827214bf1f.1320396359.git.jan.kiszka@siemens.com>

[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]

On Fri,  4 Nov 2011 09:45:59 +0100
Jan Kiszka <jan.kiszka@siemens.com> wrote:

> pci_block_user_cfg_access was designed for the use case that a single
> context, the IPR driver, temporarily delays user space accesses to the
> config space via sysfs. This assumption became invalid by the time
> pci_dev_reset was added as locking instance. Today, if you run two loops
> in parallel that reset the same device via sysfs, you end up with a
> kernel BUG as pci_block_user_cfg_access detect the broken assumption.
> 
> This reworks the pci_block_user_cfg_access to a sleeping service
> pci_cfg_access_lock and an atomic-compatible variant called
> pci_cfg_access_trylock. The former not only blocks user space access as
> before but also waits if access was already locked. The latter service
> just returns false in this case, allowing the caller to resolve the
> conflict instead of raising a BUG.
> 
> Adaptions of the ipr driver were originally written by Brian King.

Applied this series to linux-next, thanks.

-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      parent reply	other threads:[~2011-12-05 19:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1320396359.git.jan.kiszka@siemens.com>
2011-12-01 12:04 ` [PATCH v2 0/3] PCI: Rework config space locking, add INTx masking services Jan Kiszka
2011-12-01 15:06   ` Jesse Barnes
     [not found] ` <693bbd2bcf55f839d6dc4b7b002dd1827214bf1f.1320396359.git.jan.kiszka@siemens.com>
2011-12-05 19:06   ` Jesse Barnes [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=20111205110623.0eeaa2ec@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=gregkh@suse.de \
    --cc=hjk@hansjkoch.de \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mst@redhat.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).