Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ERESTARTSYS leak to userspace #319

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion XDMA/linux-kernel/xdma/cdev_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static ssize_t char_events_read(struct file *file, char __user *buf,

/* wait_event_interruptible() was interrupted by a signal */
if (rv == -ERESTARTSYS)
return -ERESTARTSYS;
return -EAGAIN;

/* atomically decide which events are passed to the user */
spin_lock_irqsave(&user_irq->events_lock, flags);
Expand Down
6 changes: 3 additions & 3 deletions XDMA/linux-kernel/xdma/libxdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -3428,7 +3428,7 @@ ssize_t xdma_xfer_aperture(struct xdma_engine *engine, bool write, u64 ep_addr,
transfer_dump(xfer);
sgt_dump(sgt);
#endif
rv = -ERESTARTSYS;
rv = -ETIMEDOUT;
break;
}

Expand Down Expand Up @@ -3658,7 +3658,7 @@ ssize_t xdma_xfer_submit(void *dev_hndl, int channel, bool write, u64 ep_addr,
transfer_dump(xfer);
sgt_dump(sgt);
#endif
rv = -ERESTARTSYS;
rv = -ETIMEDOUT;
break;
}

Expand Down Expand Up @@ -3789,7 +3789,7 @@ ssize_t xdma_xfer_completion(void *cb_hndl, void *dev_hndl, int channel,
transfer_dump(xfer);
sgt_dump(sgt);
#endif
rv = -ERESTARTSYS;
rv = -ETIMEDOUT;
break;
}

Expand Down