mcexec_wait_syscall: requeue potential request on interrupted wait

Change-Id: Id7a324f18ebb8c81f05bd8362e19d9314a445308
This commit is contained in:
Dominique Martinet
2018-07-24 18:32:19 +09:00
committed by Dominique Martinet
parent 9d587dcbe8
commit f6d8138e05

View File

@ -1317,20 +1317,18 @@ retry_alloc:
ihk_ikc_spinlock_unlock(&ppd->wq_list_lock, irqflags);
if (ret == -ERESTARTSYS) {
/* Is the request valid? */
/* Requeue valid requests */
if (wqhln->req) {
packet = wqhln->packet;
kfree(wqhln);
wqhln = NULL;
ret = -EINTR;
goto put_ppd_out;
irqflags = ihk_ikc_spinlock_lock(&ppd->wq_list_lock);
list_add_tail(&wqhln->list, &ppd->wq_req_list);
ihk_ikc_spinlock_unlock(&ppd->wq_list_lock, irqflags);
}
else {
kfree(wqhln);
wqhln = NULL;
ret = -EINTR;
goto put_ppd_out;
}
wqhln = NULL;
ret = -EINTR;
goto put_ppd_out;
}
packet = wqhln->packet;