Date: Tue, 24 Mar 2015 01:33:59 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 198860] [patch] geli: Properly propagate errors in metadata reading Message-ID: <bug-198860-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
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@FreeBSD.org Reporter: fullermd@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-198860-8>