summaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-12-13 16:11:16 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-12-13 17:30:59 -0500
commitdfd01f026058a59a513f8a365b439a0681b803af (patch)
tree45f12f19bb6f9f3b7632134fbba32f2da584ef1f /fs/cifs/inode.c
parentfc89182834dbe84c7b876d8dbe4b8ee94b6fe22c (diff)
sched/wait: Fix the signal handling fix
Jan Stancek reported that I wrecked things for him by fixing things for Vladimir :/ His report was due to an UNINTERRUPTIBLE wait getting -EINTR, which should not be possible, however my previous patch made this possible by unconditionally checking signal_pending(). We cannot use current->state as was done previously, because the instruction after the store to that variable it can be changed. We must instead pass the initial state along and use that. Fixes: 68985633bccb ("sched/wait: Fix signal handling in bit wait helpers") Reported-by: Jan Stancek <jstancek@redhat.com> Reported-by: Chris Mason <clm@fb.com> Tested-by: Jan Stancek <jstancek@redhat.com> Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> Tested-by: Chris Mason <clm@fb.com> Reviewed-by: Paul Turner <pjt@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: tglx@linutronix.de Cc: Oleg Nesterov <oleg@redhat.com> Cc: hpa@zytor.com Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 6b66dd5d1540..a329f5ba35aa 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1831,11 +1831,11 @@ cifs_invalidate_mapping(struct inode *inode)
1831 * @word: long word containing the bit lock 1831 * @word: long word containing the bit lock
1832 */ 1832 */
1833static int 1833static int
1834cifs_wait_bit_killable(struct wait_bit_key *key) 1834cifs_wait_bit_killable(struct wait_bit_key *key, int mode)
1835{ 1835{
1836 if (fatal_signal_pending(current))
1837 return -ERESTARTSYS;
1838 freezable_schedule_unsafe(); 1836 freezable_schedule_unsafe();
1837 if (signal_pending_state(mode, current))
1838 return -ERESTARTSYS;
1839 return 0; 1839 return 0;
1840} 1840}
1841 1841