[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.11.1407221658290.32060@eggly.anvils>
Date: Tue, 22 Jul 2014 17:01:03 -0700 (PDT)
From: Hugh Dickins <hughd@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Sasha Levin <sasha.levin@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Konstantin Khlebnikov <koct9i@...il.com>,
Johannes Weiner <hannes@...xchg.org>,
Michel Lespinasse <walken@...gle.com>,
Lukas Czerner <lczerner@...hat.com>,
Dave Jones <davej@...hat.com>, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] shmem: fix faulting into a hole, not taking i_mutex: fix
Sasha reports various nasty trinity crashes when shmem_fault() tries
to finish_wait(), we guess from rare cases when the wait_queue_head
on shmem_fallocate()'s stack has already gone. Fix those by using
TASK_UNINTERRUPIBLE instead of TASK_KILLABLE in prepare_to_wait(),
that's much simpler and safer: TASK_KILLABLE was a nice aspiration,
but not worth any more hassle.
Reported-and-tested-by: Sasha Levin <sasha.levin@...cle.com>
Signed-off-by: Hugh Dickins <hughd@...gle.com>
---
Andrew, please fold this into
shmem-fix-faulting-into-a-hole-not-taking-i_mutex.patch
before sending the fixes on to Linus - thanks.
mm/shmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- mmotm/mm/shmem.c 2014-07-22 16:35:49.683985586 -0700
+++ linux/mm/shmem.c 2014-07-22 16:36:35.459984108 -0700
@@ -1283,7 +1283,7 @@ static int shmem_fault(struct vm_area_st
shmem_falloc_waitq = shmem_falloc->waitq;
prepare_to_wait(shmem_falloc_waitq, &shmem_fault_wait,
- TASK_KILLABLE);
+ TASK_UNINTERRUPTIBLE);
spin_unlock(&inode->i_lock);
schedule();
--
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