[merged] signal-introduce-kernel_signal_stop-to-fix-jffs2_garbage_collect_thread.patch removed from -mm tree

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

 



The patch titled
     Subject: signal: introduce kernel_signal_stop() to fix jffs2_garbage_collect_thread()
has been removed from the -mm tree.  Its filename was
     signal-introduce-kernel_signal_stop-to-fix-jffs2_garbage_collect_thread.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Oleg Nesterov <oleg@xxxxxxxxxx>
Subject: signal: introduce kernel_signal_stop() to fix jffs2_garbage_collect_thread()

jffs2_garbage_collect_thread() can race with SIGCONT and sleep in
TASK_STOPPED state after it was already sent. Add the new helper,
kernel_signal_stop(), which does this correctly.

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
Reviewed-by: Tejun Heo <tj@xxxxxxxxxx>
Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Cc: Felipe Balbi <balbi@xxxxxx>
Cc: Markus Pargmann <mpa@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/jffs2/background.c |    3 +--
 include/linux/sched.h |   10 ++++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff -puN fs/jffs2/background.c~signal-introduce-kernel_signal_stop-to-fix-jffs2_garbage_collect_thread fs/jffs2/background.c
--- a/fs/jffs2/background.c~signal-introduce-kernel_signal_stop-to-fix-jffs2_garbage_collect_thread
+++ a/fs/jffs2/background.c
@@ -132,8 +132,7 @@ static int jffs2_garbage_collect_thread(
 			case SIGSTOP:
 				jffs2_dbg(1, "%s(): SIGSTOP received\n",
 					  __func__);
-				set_current_state(TASK_STOPPED);
-				schedule();
+				kernel_signal_stop();
 				break;
 
 			case SIGKILL:
diff -puN include/linux/sched.h~signal-introduce-kernel_signal_stop-to-fix-jffs2_garbage_collect_thread include/linux/sched.h
--- a/include/linux/sched.h~signal-introduce-kernel_signal_stop-to-fix-jffs2_garbage_collect_thread
+++ a/include/linux/sched.h
@@ -2475,6 +2475,16 @@ static inline int kernel_dequeue_signal(
 	return ret;
 }
 
+static inline void kernel_signal_stop(void)
+{
+	spin_lock_irq(&current->sighand->siglock);
+	if (current->jobctl & JOBCTL_STOP_DEQUEUED)
+		__set_current_state(TASK_STOPPED);
+	spin_unlock_irq(&current->sighand->siglock);
+
+	schedule();
+}
+
 extern void release_task(struct task_struct * p);
 extern int send_sig_info(int, struct siginfo *, struct task_struct *);
 extern int force_sigsegv(int, struct task_struct *);
_

Patches currently in -mm which might be from oleg@xxxxxxxxxx are


--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux