lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111028202216.GA21504@hmsreliant.think-freely.org>
Date:	Fri, 28 Oct 2011 16:22:16 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Scott James Remnant <scott@...split.com>
Cc:	linux-kernel@...r.kernel.org,
	Mandeep Singh Baines <msb@...omium.org>,
	Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH] coredump: wait on the core pattern umh at least once

On Fri, Oct 28, 2011 at 01:11:28PM -0700, Scott James Remnant wrote:
> If a thread crashes as a result of a signal on the thread group leader
> that signal can still be pending, which means the loop in
> wait_for_dump_helpers() falls straight though.
> 
> This can mean that the crashing process is reaped before any core
> pattern user-mode helper is run, leaving it without entries in /proc
> to look through.
> 
> While the helper obviously has to deal with that, tweaking this loop
> so it runs at least one iteration even in that case helps a lot.
> 
> Signed-off-by: Scott James Remnant <scott@...split.com>
> ---
>  fs/exec.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/exec.c b/fs/exec.c
> index 25dcbe5..8959d304 100644
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -2030,11 +2030,11 @@ static void wait_for_dump_helpers(struct file *file)
>  	pipe->readers++;
>  	pipe->writers--;
>  
> -	while ((pipe->readers > 1) && (!signal_pending(current))) {
> +	do {
>  		wake_up_interruptible_sync(&pipe->wait);
>  		kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
>  		pipe_wait(pipe);
> -	}
> +	} while ((pipe->readers > 1) && (!signal_pending(current)));
>  
>  	pipe->readers--;
>  	pipe->writers++;
> -- 
> 1.7.3.1
> 
> 
Seems reasonable to me.
Acked-by: Neil Horman <nhorman@...driver.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ