summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorJason S. McMullan <jason.mcmullan@gmail.com>2015-05-22 20:30:01 +0200
committerAnthony G. Basile <blueness@gentoo.org>2015-05-27 09:39:35 -0400
commitcf427188ad5e69e5de84461b4107697aa46f7e63 (patch)
tree886227791aa8d7906b156b26a68ebd454bf00e37 /rules
parent1713bd21e6a8005734d0086a1b9eab2812939ba5 (diff)
udev/net_id: Only read the first 64 bytes of PCI config space
The original code used fread(), which on some libc implementions (ie glibc 2.17) would pre-read a full 4K (PAGE_SIZE) of the PCI config space, when only 64 bytes were requested. I have recently come across PCIe hardware which responds with Completion Timeouts when accesses above 256 bytes are attempted. This can cause server systems with GHES/AEPI support to cause and immediate kernel panic due to the failed PCI transaction. This change replaces the buffered fread() with an explict unbuffered read() of 64 bytes, which corrects this issue by only reading the guaranteed first 64 bytes of PCIe config space. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'rules')
0 files changed, 0 insertions, 0 deletions