On Mon, 18 Jul 2005, Jeff Moyer wrote:
> Hi, Ian,
>
> A "bug" was introduced into the get_best_mount function at some point.
> Basically, if is_local_mount returns failure, we should be setting *what to
> NULL, since this is what the caller checks:
>
> colon = strchr(whatstr, ':');
> if (!colon) {
> /* No colon, take this as a bind (local) entry */
> local = 1;
> } else if (!nosymlink) {
> local = get_best_mount(whatstr, what, 0);
> if (!*whatstr) { <---------------
> warn(MODPREFIX "no host elected");
> return 1;
> }
> debug(MODPREFIX "from %s elected %s", what, whatstr);
> }
>
> Prior to the patches in this area of code, we did indeed set *what to NULL
> before returning in this specific case (the host name resolution failed,
> and this was the only entry).
>
> The way the code stands, you will end up failing the mount (for the very
> same reason, the host name lookup will fail). So, this patch is relatively
> low on the priority scale. However, it seems like a correctness issue to
> me. Otherwise, we should get rid of the check for *whatstr.
Looks like this bug it`s a bit worse.
If we have a replcated mount with two hosts where, say, the first is
dowm and the second fails name lookup then we try to mount the first
(instead of failing) leading to a hang of a couple of minutes while mount
times out.
>
> Let me know what you think.
Ouch!
Ian
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs