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 uioskip crash when skip to end #3853

Closed
wants to merge 1 commit into from
Closed

Conversation

tuxoko
Copy link
Contributor

@tuxoko tuxoko commented Sep 29, 2015

When doing uioskip to skip an iovec to the very end, the current loop
condition will falsely check pass the end of iovec. We fix this checking
uio_iovcnt first.

Signed-off-by: Chunwei Chen tuxoko@gmail.com

When doing uioskip to skip an iovec to the very end, the current loop
condition will falsely check pass the end of iovec. We fix this checking
uio_iovcnt first.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
@tuxoko
Copy link
Contributor Author

tuxoko commented Sep 29, 2015

Fix #3806
Not tested.

@behlendorf behlendorf added this to the 0.6.5.2 milestone Sep 29, 2015
@behlendorf
Copy link
Contributor

This LGTM, clearly the kernel allows nr_segs to be 0 so we must handle this case. Thanks for turning out a fix so quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants