https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198860
Bug ID: 198860
Summary: [patch] geli: Properly propagate errors in metadata
reading
Product: Base System
Version: 11.0-CURRENT
Hardware: Any
OS: Any
Status: New
Keywords: patch
Severity: Affects Many People
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
Keywords: patch
Created attachment 154744
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=154744&action=edit
Add error check
g_eli_read_metadata() doesn't check the return value of eli_metadata_read().
Because of that, if eli_metadata_read() fails, the g_eli_metadata struct passed
isn't changed (and so probably contains garbage from the caller), but
g_eli_read_metadata() returns success, so the caller will try using it.
The goto in the patch is redundant with the current code, but is added for
symmetry with other earlier error checks, and for safety if anything else later
gets added to the function.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"