-
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
Fix zfs_ioc_pool_sync should not use fnvlist #6529
Conversation
Use fnvlist on user input would allow user to easily panic zfs. Signed-off-by: Chunwei Chen <[email protected]>
force = fnvlist_lookup_boolean_value(innvl, "force"); | ||
if (innvl) { | ||
if (nvlist_lookup_boolean_value(innvl, "force", &force) != 0) { | ||
err = SET_ERROR(EINVAL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it be better to do spa_close(spa, FTAG); return (SET_ERROR(EINVAL))
instead of adding a goto
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with either way here. It's largely a matter of what's more readable and less likely to accidentally introduce a bug here in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the code is cleaner without a goto
but that might be subjective, so I'm OK either way as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, then I'll merge this as-is. Thanks.
Use fnvlist on user input would allow user to easily panic zfs. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Alek Pinchuk <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes openzfs#6529
Use fnvlist on user input would allow user to easily panic zfs. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Alek Pinchuk <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes openzfs#6529
Use fnvlist on user input would allow user to easily panic zfs. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Alek Pinchuk <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes openzfs#6529
Use fnvlist on user input would allow user to easily panic zfs. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Alek Pinchuk <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes openzfs#6529
Use fnvlist on user input would allow user to easily panic zfs. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Alek Pinchuk <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes openzfs#6529
Use fnvlist on user input would allow user to easily panic zfs. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Alek Pinchuk <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #6529
Use fnvlist on user input would allow user to easily panic zfs.
Signed-off-by: Chunwei Chen [email protected]
Description
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.