Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 151677 Details for
Bug 234073
xorg should not expand legacy mmap area
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
check for mmap failure
xorg-x11-server-mmap-failure.patch (text/plain), 1.29 KB, created by
Bjorn Helgaas
on 2007-04-04 16:39:56 UTC
(
hide
)
Description:
check for mmap failure
Filename:
MIME Type:
Creator:
Bjorn Helgaas
Created:
2007-04-04 16:39:56 UTC
Size:
1.29 KB
patch
obsolete
>--- ./hw/xfree86/os-support/bus/linuxPci.c.orig 2007-03-14 09:37:44.000000000 -0600 >+++ ./hw/xfree86/os-support/bus/linuxPci.c 2007-03-14 09:41:01.000000000 -0600 >@@ -634,28 +634,28 @@ > ADDRESS Base, unsigned long Size) > { > int domain = xf86GetPciDomain(Tag); >- int fd; >+ int fd = -1; > pointer addr; > > /* > * We use /proc/bus/pci on non-legacy addresses or if the Linux sysfs > * legacy_mem interface is unavailable. > */ >- if (Base > 1024*1024) >- return linuxMapPci(ScreenNum, Flags, Tag, Base, Size, >+ if (Base >= 1024*1024) >+ addr = linuxMapPci(ScreenNum, Flags, Tag, Base, Size, > PCIIOC_MMAP_IS_MEM); >- >- if ((fd = linuxOpenLegacy(Tag, "legacy_mem")) < 0) >- return linuxMapPci(ScreenNum, Flags, Tag, Base, Size, >+ else if ((fd = linuxOpenLegacy(Tag, "legacy_mem")) < 0) >+ addr = linuxMapPci(ScreenNum, Flags, Tag, Base, Size, > PCIIOC_MMAP_IS_MEM); >+ else >+ addr = mmap(NULL, Size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, Base); > >- addr = mmap(NULL, Size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, Base); >- if (addr == MAP_FAILED) { >- close (fd); >+ if (fd >= 0) >+ close(fd); >+ if (addr == NULL || addr == MAP_FAILED) { > perror("mmap failure"); > FatalError("xf86MapDomainMem(): mmap() failure\n"); > } >- close(fd); > return addr; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 234073
:
151676
| 151677