Bug 436061

Summary: [PATCH] pci_device_get_vendor_name always returns unknown vendor
Product: [Fedora] Fedora Reporter: Doug Chapman <dchapman>
Component: libpciaccessAssignee: Adam Jackson <ajax>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-06 19:23:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to fix NULL check in populate_vendor none

Description Doug Chapman 2008-03-05 03:51:31 UTC
Description of problem:
I have already filed a BZ at freedesktop.org for this issue:
https://bugs.freedesktop.org/show_bug.cgi?id=14818

I don't know if this is causing any real issues but I can imagine this might
confuse some of our tools that try to automagically configure X.  I am filing
this here just in case this explains any other bugs we are seeing.  If not I am
fine waiting for the next pull of libpciaccess.  I discovered this while trying
to determine why the ati driver on ia64 isn't working.


When the X server calls pci_device_get_vendor_name() it always gets NULL back. 
I traced this down to libpciaccess in populate_vendor():




    231                 if (vend->vendor_name != NULL) {
    232                     vend->vendor_name = strdup( & buf[ num_tabs + 6 ]
);
    233                 }


I assume the intention here was not to overwrite an old vendor and create a
memory leak but it appears this should be == NULL.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Doug Chapman 2008-03-05 03:51:31 UTC
Created attachment 296841 [details]
patch to fix NULL check in populate_vendor

Comment 2 Adam Jackson 2008-03-06 19:23:14 UTC
Fixed upstream, will do a new libpciaccess release and update rawhide shortly. 
Thanks!