[folded-merged] autofs4-use-wait_event_killable-fix.patch removed from -mm tree

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

 



The patch titled
     Subject: autofs4: use wake_up() instead of wake_up_interruptible
has been removed from the -mm tree.  Its filename was
     autofs4-use-wait_event_killable-fix.patch

This patch was dropped because it was folded into autofs4-use-wait_event_killable.patch

------------------------------------------------------
From: Andrei Vagin <avagin@xxxxxxxxxx>
Subject: autofs4: use wake_up() instead of wake_up_interruptible

In "autofs4: use wait_event_killable",  wait_event_interruptible() was
replaced by wait_event_killable(), but in this case we have to use
wake_up() instead of wake_up_interruptible().

In CRIU, we have the autofs test:
https://github.com/checkpoint-restore/criu/blob/master/test/zdtm/static/autofs.c

We run CRIU tests on the linux-next kernels and a few days ago this test
started to fail, actually it hangs up.

I found that wake_up_interruptible() doesn't wake up a thread, which is
waiting.

try_to_wake_up() has the argument "state", it is the mask of task states
that can be woken.

For wake_up_interruptible(), state is TASK_INTERRUPTIBLE.
For wake_up(). state is TASK_NORMAL (TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE)

If we use wait_event_killable(), the task sleeps in the TASK_KILLABLE
state, so wake_up_interruptible() isn't suitable in this case.

#define TASK_KILLABLE                   (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE)

I checked that our test passes with this patch.  I mean that we had a real
problem and we checked that it is fixed by this patch.

Link: http://lkml.kernel.org/r/20180331022839.21277-1-avagin@xxxxxxxxxx
Signed-off-by: Andrei Vagin <avagin@xxxxxxxxxx>
Acked-by: Ian Kent <raven@xxxxxxxxxx>
Cc: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>
Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


diff -puN fs/autofs4/waitq.c~autofs4-use-wait_event_killable-fix fs/autofs4/waitq.c
--- a/fs/autofs4/waitq.c~autofs4-use-wait_event_killable-fix
+++ a/fs/autofs4/waitq.c
@@ -549,7 +549,7 @@ int autofs4_wait_release(struct autofs_s
 	kfree(wq->name.name);
 	wq->name.name = NULL;	/* Do not wait on this queue */
 	wq->status = status;
-	wake_up_interruptible(&wq->queue);
+	wake_up(&wq->queue);
 	if (!--wq->wait_ctr)
 		kfree(wq);
 	mutex_unlock(&sbi->wq_mutex);
_

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

procfs-add-seq_put_hex_ll-to-speed-up-proc-pid-maps.patch
procfs-optimize-seq_pad-to-speed-up-proc-pid-maps.patch
proc-add-seq_put_decimal_ull_width-to-speed-up-proc-pid-smaps.patch
proc-replace-seq_printf-on-seq_putc-to-speed-up-proc-pid-smaps.patch
proc-optimize-single-symbol-delimiters-to-spead-up-seq_put_decimal_ull.patch
proc-replace-seq_printf-by-seq_put_smth-to-speed-up-proc-pid-status.patch
autofs4-use-wait_event_killable.patch

--
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 Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux