Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bus/pci: fix TOCTOU for sysfs access
[ upstream commit c530aa7 ] Using access followed by open causes a static analysis warning about Time of check versus Time of use. Also, access() and open() have different UID permission checks. This is not a serious problem; but easy to fix by using errno instead. Coverity issue: 300870 Fixes: 4a928ef ("bus/pci: enable write combining during mapping") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: David Marchand <david.marchand@redhat.com>
- Loading branch information