Infinite loop regression due to recent change in hostfs.c
Quoted 4 lines · Pavel Roskin
...
Log message:
2008-03-30 Pavel Roskin <...>
Quoted 8 lines
*
disk/host.c: Includegrub/misc.hto fix a warning.
*util/hostfs.c: UseGRUB_MOD_INITandGRUB_MOD_FINIto fix warnings about implicit declarations.CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/grub2/ChangeLog?cvsroot=grub&r1=1.618&r2=1.619
http://cvs.savannah.gnu.org/viewcvs/grub2/disk/host.c?cvsroot=grub&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/grub2/util/hostfs.c?cvsroot=grub&r1=1.4&r2=1.5
The change in hostfs.c introduces an interesting regression: hostfs now appears in *_init.lst and grub_hostfs_init() is called twice in grub-emu and grub-fstest. This results in a infinite loop because the hostfs entry of grub_fs_list points to itself.
Demo version :-)
$ grub-fstest -d all /dev/sdX ls -l | grep Detecting | head -10000 | uniq -c
You should either undo this change or remove extra calls to grub_hostfs_init/fini from grub-emu.c and grub-fstest.c. The latter might not work if it is necessary to init hostfs first for some reason.
Christian
Quoting Christian Franke <[email protected]>:
Quoted 4 lines
The change in
hostfs.cintroduces an interesting regression: hostfs now appears in *_init.lst andgrub_hostfs_init()is called twice in grub-emu and grub-fstest. This results in a infinite loop because the hostfs entry ofgrub_fs_listpoints to itself.
Thanks for noticing the problem and for the analysis!
Quoted 3 lines
You should either undo this change or remove extra calls to grub_hostfs_init/fini from
grub-emu.candgrub-fstest.c. The latter might not work if it is necessary to init hostfs first for some reason.
I've removed the extra calls. I don't see any reasons why hostfs should be registered first.
Signature · 2 lines
Regards, Pavel Roskin
Quoted 8 lines · Pavel Roskin
Quoting Christian Franke <...>:
Quoted 3 lines
You should either undo this change or remove extra calls to grub_hostfs_init/fini from
grub-emu.candgrub-fstest.c. The latter might not work if it is necessary to init hostfs first for some reason.I've removed the extra calls. I don't see any reasons why hostfs should be registered first.
It now works as expected.
Christian
Quoted 7 lines · Pavel Roskin
Quoting Christian Franke <[email protected]>:
Quoted 4 lines
The change in
hostfs.cintroduces an interesting regression: hostfs now appears in *_init.lst andgrub_hostfs_init()is called twice in grub-emu and grub-fstest. This results in a infinite loop because the hostfs entry ofgrub_fs_listpoints to itself.
Quoted 8 lines
Thanks for noticing the problem and for the analysis!
Quoted 3 lines
You should either undo this change or remove extra calls to grub_hostfs_init/fini from
grub-emu.candgrub-fstest.c. The latter might not work if it is necessary to init hostfs first for some reason.I've removed the extra calls. I don't see any reasons why hostfs should be registered first.
I suspect it was a remnant from before we had grub_init_all().
Signature · 5 lines
Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.)