From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 5 Dec 2011 11:06:23 -0800 From: Jesse Barnes To: Jan Kiszka Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, "Hans J. Koch" , Greg Kroah-Hartman , "Michael S. Tsirkin" , kvm@vger.kernel.org Subject: Re: [PATCH v2 1/3] pci: Rework config space blocking services Message-ID: <20111205110623.0eeaa2ec@jbarnes-desktop> In-Reply-To: <693bbd2bcf55f839d6dc4b7b002dd1827214bf1f.1320396359.git.jan.kiszka@siemens.com> References: <693bbd2bcf55f839d6dc4b7b002dd1827214bf1f.1320396359.git.jan.kiszka@siemens.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/_tyQgg6dL2ArbgXgVwdS6X/"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: --Sig_/_tyQgg6dL2ArbgXgVwdS6X/ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 4 Nov 2011 09:45:59 +0100 Jan Kiszka 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. >=20 > 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. >=20 > Adaptions of the ipr driver were originally written by Brian King. Applied this series to linux-next, thanks. --=20 Jesse Barnes, Intel Open Source Technology Center --Sig_/_tyQgg6dL2ArbgXgVwdS6X/ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJO3RYvAAoJEIEoDkX4Qk9hZyIP/i1yZ0JftIAUlTuroMlyKwzh bG4apRW7//sp4FTJvLYn5btZfN44uxtgFyxYxRFGEWUwtzLO5HYgJop1PNVPL57t HrQewqmNDQhWFhK+tR/7SXdxo7XICHMlGcZcX6OCet22m62PZRnY8A3O1TKoN1We wMJGY//rPh5/SK6nfkmHuwbP3rJTUJSlNZklV1MHN5gp91angikF4qanMhj0KTjD tqILYffBItd/Qrv494q6RnlMMIrASBY9Y/kzQJE6aHPowIx49cwj9wZUQohjSKf7 cOV5aRUaWbyZ2tb43XjrC5yE+LlQK7YdW2+b2goea8iQeHL+BcZWErhJw23JAFq/ 3F2IcGwIYizBGVit3NxArjFNagki6oOYBGUslXl6me5tDjFWadZGUP+aSzgTGO80 y9CPGrhnnWBlQ84o6Fx8wN2n/N7RMNsmkF9XgbunO5Hb3WtjDUL2aApF8pnBf4tr Rc9Ml/50YPZrtbiwbtlMYlt1EmyvP+92nA8fNY6bSL/txGZ36PV85PFxr9FkaTfo 7TN6MFZPm4vo4JediCsLPBwK0vTwyFgRkOappoLE/kcqAhrZjGckgEzh/+sUPGp0 tzsv3C42t+HBJRXBZwhud3A3L8wgMR3xPg1wTpVMO8hjGfLitQX6pFofWV988Duh xVkFXN6rRTKIKW15h1J5 =m5Tj -----END PGP SIGNATURE----- --Sig_/_tyQgg6dL2ArbgXgVwdS6X/--