-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
kobj_read_file: Return -1 on vn_rdwr() error #4104
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ryao
force-pushed
the
kobj
branch
3 times, most recently
from
December 15, 2015 16:42
eb34f12
to
85d6ad1
Compare
ryao
changed the title
kobj_read_file: Fix uninitialized value on vn_rdwr() error
kobj_read_file: Return -1 on vn_rdwr() error
Dec 15, 2015
ryao
added a commit
to ryao/spl
that referenced
this pull request
Dec 15, 2015
I noticed that the SPL implementation of kobj_read_file is not correct after comparing it with the userland implementation of kobj_read_file() in openzfs/zfs#4104. The function is tiny enough that my patch could qualify to be called a "rewrite", so I am just copying the function on the basis that a rewrite allows me to license the code under both the CDDL and GPL. Signed-off-by: Richard Yao <[email protected]>
ryao
added a commit
to ryao/spl
that referenced
this pull request
Dec 15, 2015
I noticed that the SPL implementation of kobj_read_file is not correct after comparing it with the userland implementation of kobj_read_file() in openzfs/zfs#4104. The function is tiny enough that my patch could qualify to be called a "rewrite", so I am just copying the function on the basis that a rewrite allows me to license the code under both the CDDL and GPL. Signed-off-by: Richard Yao <[email protected]>
ryao
added a commit
to ryao/spl
that referenced
this pull request
Dec 15, 2015
I noticed that the SPL implementation of kobj_read_file is not correct after comparing it with the userland implementation of kobj_read_file() in openzfs/zfs#4104. The function is tiny enough that my patch could qualify to be called a "rewrite", so I am just copying the function on the basis that a rewrite allows me to license the code under both the CDDL and GPL. Signed-off-by: Richard Yao <[email protected]>
LLVM's static analyzer showed that we could subtract using an uninitialized value on an error from vn_rdwr(). The correct behavior is to return -1 on an error, so lets do that instead. Signed-off-by: Richard Yao <[email protected]>
ryao
added a commit
to ryao/spl
that referenced
this pull request
Dec 15, 2015
I noticed that the SPL implementation of kobj_read_file is not correct after comparing it with the userland implementation of kobj_read_file() in openzfs/zfs#4104. The function is tiny enough that my patch could qualify to be called a "rewrite", so I am just copying the function on the basis that a rewrite allows me to license the code under both the CDDL and GPL. Note that we no longer pass RLIM64_INFINITY with this, but our vn_rdwr implementation did not support it anyway, so there is no difference. Signed-off-by: Richard Yao <[email protected]>
behlendorf
pushed a commit
to openzfs/spl
that referenced
this pull request
Jan 23, 2016
I noticed that the SPL implementation of kobj_read_file is not correct after comparing it with the userland implementation of kobj_read_file() in openzfs/zfs#4104. Note that we no longer pass RLIM64_INFINITY with this, but our vn_rdwr implementation did not support it anyway, so there is no difference. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #513
Merged as: 957dc93 kobj_read_file: Return -1 on vn_rdwr() error |
goulvenriou
pushed a commit
to Alyseo/zfs
that referenced
this pull request
Feb 3, 2016
LLVM's static analyzer showed that we could subtract using an uninitialized value on an error from vn_rdwr(). The correct behavior is to return -1 on an error, so lets do that instead. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#4104
Flefebvre
pushed a commit
to Flefebvre/zfs
that referenced
this pull request
Feb 3, 2016
LLVM's static analyzer showed that we could subtract using an uninitialized value on an error from vn_rdwr(). The correct behavior is to return -1 on an error, so lets do that instead. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#4104
Flefebvre
pushed a commit
to Flefebvre/zfs
that referenced
this pull request
Feb 3, 2016
LLVM's static analyzer showed that we could subtract using an uninitialized value on an error from vn_rdwr(). The correct behavior is to return -1 on an error, so lets do that instead. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#4104
Flefebvre
pushed a commit
to Flefebvre/zfs
that referenced
this pull request
Feb 3, 2016
LLVM's static analyzer showed that we could subtract using an uninitialized value on an error from vn_rdwr(). The correct behavior is to return -1 on an error, so lets do that instead. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#4104
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LLVM's static analyzer showed that we could subtract using an
uninitialized value on an error from vn_rdwr().
The correct behavior is to return -1 on an error, so lets do that
instead.
Signed-off-by: Richard Yao [email protected]