j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: mcayland Date: Sun Mar 9 21:50:36 2014 New Revision: 1278 URL: http://tracker.coreboot.org/trac/openbios/changeset/1278
Log: mac-parts.c: prevent hang when opening partition without valid filesystem
If a partition was opened with a file argument such as "hd:2,\:tbxi" and no valid filesystem was detected, mac-parts would still attempt to access the file system in order to evaluate the file argument resulting in a hang.
Make sure that we return a failure code to the caller to ensure that OpenBIOS doesn't continue to try and access the file when the underlying filesystem is invalid. As reported by Andrei E. Warkentin andrey.warkentin@gmail.com.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/packages/mac-parts.c
Modified: trunk/openbios-devel/packages/mac-parts.c ============================================================================== --- trunk/openbios-devel/packages/mac-parts.c Sat Mar 8 14:03:01 2014 (r1277) +++ trunk/openbios-devel/packages/mac-parts.c Sun Mar 9 21:50:36 2014 (r1278) @@ -286,6 +286,12 @@ goto out; } else { DPRINTF("mac-parts: no filesystem found on partition %d; bypassing misc-files interpose\n", parnum); + + /* Here we have a valid partition; however if we tried to pass in a file argument for a + partition that doesn't contain a filesystem, then we must fail */ + if (strlen(argstr)) { + ret = 0; + } } }