* Infinite loop regression due to recent change in hostfs.c
@ 2008-04-05 11:36 Christian Franke
2008-04-06 17:21 ` Pavel Roskin
0 siblings, 1 reply; 4+ messages in thread
From: Christian Franke @ 2008-04-05 11:36 UTC (permalink / raw)
To: grub-devel
Pavel Roskin wrote:
> ...
> Log message:
> 2008-03-30 Pavel Roskin <...>
>
> * disk/host.c: Include grub/misc.h to fix a warning.
> * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Infinite loop regression due to recent change in hostfs.c
2008-04-05 11:36 Infinite loop regression due to recent change in hostfs.c Christian Franke
@ 2008-04-06 17:21 ` Pavel Roskin
2008-04-07 19:39 ` Christian Franke
2008-04-13 11:46 ` Robert Millan
0 siblings, 2 replies; 4+ messages in thread
From: Pavel Roskin @ 2008-04-06 17:21 UTC (permalink / raw)
To: The development of GRUB 2, Christian Franke; +Cc: grub-devel
Quoting Christian Franke <Christian.Franke@t-online.de>:
> 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.
Thanks for noticing the problem and for the analysis!
> 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.
I've removed the extra calls. I don't see any reasons why hostfs
should be registered first.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Infinite loop regression due to recent change in hostfs.c
2008-04-06 17:21 ` Pavel Roskin
@ 2008-04-07 19:39 ` Christian Franke
2008-04-13 11:46 ` Robert Millan
1 sibling, 0 replies; 4+ messages in thread
From: Christian Franke @ 2008-04-07 19:39 UTC (permalink / raw)
To: The development of GRUB 2
Pavel Roskin wrote:
> Quoting Christian Franke <...>:
>
>> 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.
>
> I've removed the extra calls. I don't see any reasons why hostfs
> should be registered first.
>
It now works as expected.
Christian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Infinite loop regression due to recent change in hostfs.c
2008-04-06 17:21 ` Pavel Roskin
2008-04-07 19:39 ` Christian Franke
@ 2008-04-13 11:46 ` Robert Millan
1 sibling, 0 replies; 4+ messages in thread
From: Robert Millan @ 2008-04-13 11:46 UTC (permalink / raw)
To: The development of GRUB 2; +Cc: Christian Franke
On Sun, Apr 06, 2008 at 01:21:31PM -0400, Pavel Roskin wrote:
> Quoting Christian Franke <Christian.Franke@t-online.de>:
>
> >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.
>
> Thanks for noticing the problem and for the analysis!
>
> >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.
>
> 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().
--
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 /.)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-04-13 11:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-05 11:36 Infinite loop regression due to recent change in hostfs.c Christian Franke
2008-04-06 17:21 ` Pavel Roskin
2008-04-07 19:39 ` Christian Franke
2008-04-13 11:46 ` Robert Millan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.