Age | Commit message (Collapse) | Author | Files | Lines |
|
Error: File Leak
Leaked File f
at line 272 of src/common_device_name.c in function 'populate_vendor'.
f initialized at line 204 with fopen("/usr/share/hwdata/pci.ids", "r").
[ This bug was found by the Parfait 0.5.0 bug checking tool.
For more information see http://labs.oracle.com/projects/parfait/ ]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
|
|
When num_ios goes from 1 to 0, a realloc(ios, 0); call is made.
This is equivalent to free(ios) and NULL is returned.
However, the previous logic in the code incorrectly discards this NULL
return value. When we next call new_io_handle(), realloc(ios, X) is
called with "ios" pointing to freed memory. This causes glibc to abort.
Correct this logic to detect the 1-to-0 case and handle it correctly.
Other cases are unchanged; there is still value in checking the
return value from realloc() as it also returns NULL on error.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
|
|
Makes sure xserver disables DRI if the VGA arbiter is in use.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
|
|
(1) added prom property retrieval on sparc
(2) added multiple domain support on sparc
(3) use kernel device as mapping device
(4) performance improvements by removing redundant ioctl
Signed-off-by: Henry Zhao <henry.zhao@oracle.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Since the fd is not closed, calling pci_system_init and
pci_system_cleanup more than 1024 times results in "too many files open"
error.
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
commit a18460b385ae03 converted from a fixed maximum number of devices
to dynamically growing the list via realloc, but didn't update the
error message shown on failure.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
|
|
O_RDONLY | O_WRONLY != O_RDWR
><
Reported-by: Javier Pello <javier.pello@urjc.es>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=31133
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
This allows platforms to hand back mmaps of the low 1M (ISA) address
space on a per-domain basis.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
git diff -w & git diff -b show no diffs from this change
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
If scandir returns -1, the 'devices' array won't be initialized, and
attempting to free() it will crash.
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
errno is only valid after an error, and was being filled with a garbage
value upon eof.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
1. Removed hardcoded maximum size of 256 PCI devices, which is
too small for large systems. The number of devices is dynamically
resized as needed.
2. pci_device_solx_devfs_probe() no longer walks the device tree
from the very top ("/") but instead starts at the nexus which
owns the bus. Performance optimization for systems with multiple
bus nodes (including systems with just one segment/domain).
3. Added support for multiple domains/segments. Code tested
on kernels with and without multiple segment support so it should
be safe to integrate independent of the kernel version.
Signed-off-by: John Martin <John.M.Martin@Oracle.COM>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
Group statements per section as per Autoconf standard layout
Quote statements where appropriate.
Autoconf recommends not using dnl instead of # for comments
Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters.
Add AC_CONFIG_SRCDIR([Makefile.am])
Update X.Org util-macros to version 1.8
This helps automated maintenance and release activities.
Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
This silences an Automake warning.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
AC_PROG_C_C99. This sets gcc with -std=gnu99.
If AC_PROG_CC macro is called afterwards, it resets CC to gcc.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Regroup AC statements under the Autoconf initialization section.
Regroup AM statements under the Automake initialization section.
Add missing AC_CONFIG_SRCDIR
Replace obsolete argument to AC_OUTPUT with AC_CONFIG_FILES
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Bit 7 of the pci device header type is an indicator of multi-function
devices, so needs to be masked when examining the bridge type.
Thanks go to Chih-Pin Wu for finding the bug and its fix.
https://bugs.launchpad.net/ubuntu/+source/libpciaccess/+bug/681207
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Bryce Harrington <bryce@canonical.com>
|
|
This reverts commit 2bda5b733bb12854760750c08138db95e77aea0c.
It actually conflicts with 9ba94caf57e3a8c3e9c6f3f5f068f4a7a7b3ff9d
which came earlier, but I didn't catch it probably because I did a blind
rebase before pushing.
When reading bridge bus info, we may need to read out the current bridge
info if the PCI bridge private is uninitialized, so remove the check at
the top that would always short circuit the case where the priv was
still 0.
References:
https://bugs.launchpad.net/ubuntu/+source/libpciaccess/+bug/681207.
Reported-by: Bryce Harrington <bryce@canonical.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
In generated scanpci/Makefile, this line is added:
scanpci_DEPENDENCIES = $(top_builddir)/src/libpciaccess.la
If the content of the library changes, the tool will rebuild.
When scanpci was in the same directory as the library, the .la file was used.
This will also ensure the "installed" pciaccess library is not used.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Makefiles are simpler when they only handle what is in their
directory.
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Fixes an Automake warning.
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
No function changes.
Note that automake generates a wrapper script if libpciaccess
is not installed at configuration time, which is the most common case.
If it is installed at configuration time, you get an executable.
The makefile build order ensures the lib is build before scanpci.
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Use the latest version now hosted by GNU.
The renaming protects Autoconf namespace.
There is no functional change in the macro.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
|
|
Add an include that makes the file common_vgaarb.c see the same
struct pci_system as the file linux_sysfs.c.
Without this fix, on a MTRR system, the vgaarb_fd member
would overwrite the mtrr_fd member and cause the MTRR_IOC_ADD_ENTRY call
to be issued to the incorrect device causing the infamous
"Inappropriate ioctl for device (25)" error.
This error would cause MTRR setup to fail on all systems relying on it
and is severe enough to warrant a new release.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Using the pointer passed to realloc earlier isn't a recipe for success.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Stop hardcoding -ldevinfo since configure/libtool already know to add it
for static linking, and ELF dependencies handle it for dynamic linking
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Decode kernel operation can also change vga refcount, so we need to read back
the information when calling it.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
This was introduced in e360c11c.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Memory leak of pointer 'agp_info'
at line 119 of src/common_capability.c in function 'pci_fill_capabilities_generic'.
'agp_info' allocated at line 107 with calloc(1, 12).
'agp_info' leaks when err != 0 at line 118.
at line 124 of src/common_capability.c in function 'pci_fill_capabilities_generic'.
'agp_info' allocated at line 107 with calloc(1, 12).
'agp_info' leaks when err != 0 at line 123.
[ This bug was found by the Parfait bug checking tool.
For more information see http://research.sun.com/projects/parfait ]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Unrelated to the previous patches, the new value simply reflects
the reality that the minimum level for autoconf to configure
all x.org modules is 2.60 dated June 2006.
ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Automake always includes it in the tarball.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
This adds support on x86 for OSes that do not have a PCI interface,
tinkering with I/O ports, and makes use of it on GNU/Hurd.
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|