libhsakmt: Distinguish EPERM and EACCES
EPERM means "operation not permitted" and is returned when CGroup
access checks fail. EACCES means "permission denied" and is returned
when the device file permission bits or access control list don't
allow access.
EPERM can fail silently, since we assume the administrator disabled
a device on purpose in the CGroup. EACCESS should produce an error
message and an info message to check the device file permissions.
Change-Id: Iee4c5584c5fdc4e113c3d760dede6661097b4341
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
[ROCm/ROCR-Runtime commit: 5e4e19d47b]
这个提交包含在:
1 父节点
b3fdcfe3b9
当前提交
6819730ea3
1 个文件已更改
+3
-3
@@ -1733,10 +1733,10 @@ int open_drm_render_device(int minor)
|
||||
sprintf(path, "/dev/dri/renderD%d", minor);
|
||||
fd = open(path, O_RDWR | O_CLOEXEC);
|
||||
if (fd < 0) {
|
||||
if (errno != ENOENT) {
|
||||
if (errno == EPERM)
|
||||
pr_info("Check a) User is in \"video\" group b) cgroup permissions\n");
|
||||
if (errno != ENOENT && errno != EPERM) {
|
||||
pr_err("Failed to open %s: %s\n", path, strerror(errno));
|
||||
if (errno == EACCES)
|
||||
pr_info("Check user is in \"video\" group\n");
|
||||
}
|
||||
return -errno;
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户