libhsakmt: Handle unaccessible p2p_links
Device cgroup can limit accessible devices. Handle the cases where p2p_links are not accessible Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Change-Id: I513dc75ad14e4f2d426cf2fbd301bcba12b4ee54
This commit is contained in:
+2
-1
@@ -1476,7 +1476,8 @@ static HSAKMT_STATUS topology_sysfs_get_iolink_props(uint32_t node_id,
|
||||
|
||||
read_size = fread(read_buf, 1, PAGE_SIZE, fd);
|
||||
if (read_size <= 0) {
|
||||
ret = HSAKMT_STATUS_ERROR;
|
||||
ret = (errno == EPERM) ? HSAKMT_STATUS_NOT_SUPPORTED :
|
||||
HSAKMT_STATUS_ERROR;
|
||||
goto err2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user