OSDN Git Service
(root)
/
android-x86
/
external-libpciaccess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9c5ce8
)
linux sysfs: Fix read-write access in map_legacy
author
Jeremy Huddleston
<jeremyhu@apple.com>
Tue, 11 Oct 2011 17:22:49 +0000
(10:22 -0700)
committer
Jeremy Huddleston
<jeremyhu@apple.com>
Tue, 11 Oct 2011 17:22:49 +0000
(10:22 -0700)
O_RDONLY | O_WRONLY != O_RDWR
><
Reported-by: Javier Pello <javier.pello@urjc.es>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
src/linux_sysfs.c
patch
|
blob
|
history
diff --git
a/src/linux_sysfs.c
b/src/linux_sysfs.c
index
876abb1
..
d5ba66a
100644
(file)
--- a/
src/linux_sysfs.c
+++ b/
src/linux_sysfs.c
@@
-851,7
+851,7
@@
pci_device_linux_sysfs_map_legacy(struct pci_device *dev, pciaddr_t base,
int ret=0;
if (map_flags & PCI_DEV_MAP_FLAG_WRITABLE) {
- flags
|= O_WRONLY
;
+ flags
= O_RDWR; /* O_RDWR != O_WRONLY | O_RDONLY */
;
prot |= PROT_WRITE;
}