diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-11 10:22:49 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-11 10:22:49 -0700 |
commit | af4478c52c960bee08209293aa14b784ac30dc05 (patch) | |
tree | e5c4284008c3be65b16690652c467697eab811fe | |
parent | b9c5ce8083be53ea017bd15a63b173b4476fff23 (diff) |
linux sysfs: Fix read-write access in map_legacy
O_RDONLY | O_WRONLY != O_RDWR
><
Reported-by: Javier Pello <javier.pello@urjc.es>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | src/linux_sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c index 876abb1..d5ba66a 100644 --- 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; } |