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]
Date:	Mon, 26 Oct 2015 08:48:48 +0100
From:	Markus Pargmann <mpa@...gutronix.de>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	nbd-general@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mm 1/3] nbd: nbd_thread_send: remove the unnecessary
 kernel_dequeue_signal()

On Sun, Oct 25, 2015 at 04:26:37PM +0100, Oleg Nesterov wrote:
> nbd_thread_send() does kernel_dequeue_signal() at the end for no reason,
> it is fine to exit with the pending SIGKILL.
> 
> Not sure it really needs another kernel_dequeue_signal() inside the
> main loop, we know that signal_pending() means SIGKILL. But probably
> we want to clear TIF_SIGPENDING before sock_shutdown().

Yes, I don't think it would be good to go into a tcp socket shutdown
with a pending signal although I don't know if this would make
difficulties.

I will apply the patch to my tree and send it out as pull request to
Jens as usual.

Thanks,

Markus

> 
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> ---
>  drivers/block/nbd.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
> index b85e7a0..e5d96e5 100644
> --- a/drivers/block/nbd.c
> +++ b/drivers/block/nbd.c
> @@ -586,10 +586,6 @@ static int nbd_thread_send(void *data)
>  	nbd->task_send = NULL;
>  	spin_unlock_irqrestore(&nbd->tasks_lock, flags);
>  
> -	/* Clear maybe pending signals */
> -	if (signal_pending(current))
> -		kernel_dequeue_signal(NULL);
> -
>  	return 0;
>  }
>  
> -- 
> 1.5.5.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ