diff options
author | Jason S. McMullan <jason.mcmullan@gmail.com> | 2015-05-22 20:30:01 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-05-22 20:50:01 +0200 |
commit | 0454229c100a2113ba82df55703436d6cb2c492b (patch) | |
tree | d4b5f4d7a3cc9bc524835bbb161899675a59df9a /src/shared/json.h | |
parent | 882897afeeb0eabb3eae04a6e54beff8cb206514 (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.
Diffstat (limited to 'src/shared/json.h')
0 files changed, 0 insertions, 0 deletions