qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Fix hang with -L and symlink loop


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] Fix hang with -L and symlink loop
Date: Wed, 30 May 2018 13:50:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 05/29/2018 04:44 PM, Evan Green wrote:
> When using -L with Linux app emulation, there is an issue in
> init_paths where Qemu will get lost exploring a directory tree
> with a symlink loop in it. This causes Qemu to hang, and
> eventually consume all memory in the system.
> 
> Qemu's code for pre-exploring the entire directory tree is both
> error-prone and slow. Instead, this changes uses faccessat, which
> both avoids the symlink loop (since the entire directory space isn't
> being explored up front), and likely speeds things up a bit.
> 
> Partial credit goes to Richard Henderson, as it was only after staring
> at his patch [1] that I wrote mine.
> 
> [1] https://patchwork.kernel.org/patch/9512083/
> 
> Signed-off-by: Evan Green <address@hidden>
> ---

I like this as an improvement on the current situation.
Perhaps folks do like this a bit better than my more invasive patch.

> +int pathprefixfd = -1;
> +__thread char gluedpath[PATH_MAX];

static for both, otherwise,
Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]