Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 161866 - Race condition accessing PCI config space
Summary: Race condition accessing PCI config space
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Jim Paradis
QA Contact: Brian Brock
Depends On:
Blocks: 168424
TreeView+ depends on / blocked
Reported: 2005-06-27 22:14 UTC by David Milburn
Modified: 2007-11-30 22:07 UTC (History)
5 users (show)

Fixed In Version: RHSA-2006-0144
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-03-15 16:08:41 UTC
Target Upstream Version:

Attachments (Terms of Use)
Patch to synchronize access to PCI config space (deleted)
2005-06-27 22:15 UTC, David Milburn
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2006:0144 qe-ready SHIPPED_LIVE Moderate: Updated kernel packages available for Red Hat Enterprise Linux 3 Update 7 2006-03-15 05:00:00 UTC

Description David Milburn 2005-06-27 22:14:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050302 Firefox/1.0.1 Fedora/1.0.1-1.3.2

Description of problem:
CF8/CFC cycles may get intermingled creating a race condition. It is possible to have two CF8 writes before a CFC access, customer has seen a particular case when acpi_os_write_pci_configuration() is calling pci_conf1_write() which is protected by pci_config_lock, while a driver (tg3 in this case) is calling pci_conf1_write_config_dword() which is not protected. 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Load tg3 driver on EM64T.

Actual Results:  FSB trace showed several places where the system has CF8/CFC cycles which are getting intermingled.

Expected Results:  PCI access should be protected.

Additional info:

Attaching patch provided by the customer, they have verified that the patch fixes the problem.

Comment 1 David Milburn 2005-06-27 22:15:45 UTC
Created attachment 116037 [details]
Patch to synchronize access to PCI config space

Comment 2 John W. Linville 2005-06-28 14:42:51 UTC
Patch looks pretty sane to me, and fairly close to the x86 version.  Not sure 
why they added NULL checks of *value for the pci_*_read_config_byte and 
pci_*_read_config_word but not to the pci_*_read_config_dword versions, but 
other than that, it looks fine... 

Comment 13 Samuel Benjamin 2005-10-05 18:20:57 UTC
Please add PM and QE acks to add this fix into U7. Thanks.

Comment 18 Ernie Petrides 2005-10-20 05:43:17 UTC
A fix for this problem has just been committed to the RHEL3 U7
patch pool this evening (in kernel version 2.4.21-37.6.EL).

Comment 23 Red Hat Bugzilla 2006-03-15 16:08:41 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.