[Bug 198860] [patch] geli: Properly propagate errors in metadata reading
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Mar 24 01:34:00 UTC 2015
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: freebsd-bugs at FreeBSD.org
Reporter: fullermd at over-yonder.net
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.
More information about the freebsd-bugs
mailing list