On Wed, Jan 7, 2026 at 6:14 PM Lizhi Hou <[email protected]> wrote: > > > @@ -1108,6 +1108,9 @@ static void *msg_xfer(struct qaic_device *qdev, > > struct wrapper_list *wrappers, u > > mutex_lock(&qdev->cntl_mutex); > > if (!list_empty(&elem.list)) > > list_del(&elem.list); > > + /* resp_worker() processed the response but the wait was interrupted > > */ > > + else if (list_empty(&elem.list) && ret == -ERESTARTSYS) > > Rechecking list_empty(&elem.list) can be removed. Good point, I'll apply this in the next revision. > > And if ret == -ERESTARTSYS, elem.buf is not NULL? No, this check handles the case where resp_worker() is able to get to the element inside list_for_each_*(), which will set elem->buf to the resp message, at the same time the user interrupts the wait in msg_xfer(). So, it will be treated as a valid response message.
- Youssef
