From 84308ac82f8328d01e95daba091430746d474eca Mon Sep 17 00:00:00 2001 From: Oren Kladnitsky Date: Mon, 7 Oct 2013 13:25:54 +0300 Subject: [PATCH] On mclose a pci conf device, add a read from a safe-to-read address This prevents side effects on a full pci config dump through sysfs or other method. --- include/mtcr_ul/mtcr.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/mtcr_ul/mtcr.h b/include/mtcr_ul/mtcr.h index aceaa50..d9e342e 100644 --- a/include/mtcr_ul/mtcr.h +++ b/include/mtcr_ul/mtcr.h @@ -1076,10 +1076,13 @@ int mclose(mfile *mf) ; #else { + unsigned int word; #if CONFIG_ENABLE_MMAP if (mf->ptr) munmap(mf->ptr,MTCR_MAP_SIZE); + else #endif + mread4(mf, 0xf0014, &word); close(mf->fd); free(mf); return 0; -- 2.46.0