Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1255418

[PATCH -mm 1/3] nbd: nbd_thread_send: remove the unnecessary kernel_dequeue_signal()

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject [PATCH -mm 1/3] nbd: nbd_thread_send: remove the unnecessary kernel_dequeue_signal()
Date 2015-10-25 15:40 +0100
Message-ID <qnuCK-481-21@gated-at.bofh.it> (permalink)
References <qnuCK-481-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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().

Signed-off-by: Oleg Nesterov <oleg@redhat.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

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH -mm 0/3] nbd: fix/cleanup the usage of  kernel_dequeue_signal() Oleg Nesterov <oleg@redhat.com> - 2015-10-25 15:40 +0100
  [PATCH -mm 3/3] nbd: don't abuse irqsave/irqrestore while taking  nbd->tasks_lock Oleg Nesterov <oleg@redhat.com> - 2015-10-25 15:40 +0100
    Re: [PATCH -mm 3/3] nbd: don't abuse irqsave/irqrestore while taking  nbd->tasks_lock Markus Pargmann <mpa@pengutronix.de> - 2015-10-26 09:00 +0100
  [PATCH -mm 1/3] nbd: nbd_thread_send: remove the unnecessary  kernel_dequeue_signal() Oleg Nesterov <oleg@redhat.com> - 2015-10-25 15:40 +0100
    Re: [PATCH -mm 1/3] nbd: nbd_thread_send: remove the unnecessary  kernel_dequeue_signal() Markus Pargmann <mpa@pengutronix.de> - 2015-10-26 08:50 +0100

csiph-web