Skip to content

Commit 811ed06

Browse files
fix: Fix unrecoverable abort during device destruction
An inappropriate ioctl call for the device is observed when both zesInit and zeInit are called in a process and Sysman device reset is called. A condition has been added in the UNRECOVERABLE_IF to prevent crash during cleanup. Related-To: NEO-16439 Signed-off-by: Pratik Bari <[email protected]>
1 parent ffb1d29 commit 811ed06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared/source/os_interface/linux/drm_neo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,14 +425,14 @@ void Drm::destroyDrmContext(uint32_t drmContextId) {
425425
GemContextDestroy destroy{};
426426
destroy.contextId = drmContextId;
427427
auto retVal = ioctlHelper->ioctl(DrmIoctl::gemContextDestroy, &destroy);
428-
UNRECOVERABLE_IF((retVal != 0) && (errno != ENODEV));
428+
UNRECOVERABLE_IF((retVal != 0) && (errno != ENODEV) && (errno != ENOTTY));
429429
}
430430

431431
void Drm::destroyDrmVirtualMemory(uint32_t drmVmId) {
432432
GemVmControl ctl = {};
433433
ctl.vmId = drmVmId;
434434
auto ret = ioctlHelper->ioctl(DrmIoctl::gemVmDestroy, &ctl);
435-
UNRECOVERABLE_IF((ret != 0) && (errno != ENODEV));
435+
UNRECOVERABLE_IF((ret != 0) && (errno != ENODEV) && (errno != ENOTTY));
436436
}
437437

438438
int Drm::queryVmId(uint32_t drmContextId, uint32_t &vmId) {

0 commit comments

Comments
 (0)