libhsakmt: check ret and errno for EBADF
Change-Id: I9fcbf955d8b7b01ff1025534a8c2eaa8e6790565
Signed-off-by: Srinivasan Subramanian <srinivasan.subramanian@amd.com>
[ROCm/ROCR-Runtime commit: 5e35364838]
Este cometimento está contido em:
1 ascendente
bbb15f8992
cometimento
08ae75cfca
1 ficheiro modificado
+1
-1
@@ -13,7 +13,7 @@ int kmtIoctl(int fd, unsigned long request, void *arg)
|
|||||||
ret = ioctl(fd, request, arg);
|
ret = ioctl(fd, request, arg);
|
||||||
} while (ret == -1 && (errno == EINTR || errno == EAGAIN));
|
} while (ret == -1 && (errno == EINTR || errno == EAGAIN));
|
||||||
|
|
||||||
if (errno == EBADF) {
|
if (ret == -1 && errno == EBADF) {
|
||||||
/* In case pthread_atfork didn't catch it, this will
|
/* In case pthread_atfork didn't catch it, this will
|
||||||
* make any subsequent hsaKmt calls fail in CHECK_KFD_OPEN.
|
* make any subsequent hsaKmt calls fail in CHECK_KFD_OPEN.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Criar uma nova questão referindo esta
Bloquear um utilizador