# \[PATCH 13/15\] s390/mm: Fix missed tsk-\>pagefault\_disabled conversion to pagefault\_disable()

- From: Tom Zanussi \<hidden\>
- Date: 2018-08-03 15:23:07 
- List: linux-rt-users
- Page: https://ratatoskr.run/linux-rt-users/2018/08/16487193
- Thread: https://ratatoskr.run/linux-rt-users/2018/08/5349594/t.md

```text
commit 7be67fb433a0 ("mm: pagefault_disabled()") does this for s390:

  -       if (unlikely(!user_space_fault(regs) || in_atomic() || !mm ||
  +       if (unlikely(!user_space_fault(regs) || !mm ||
                       tsk->pagefault_disabled))

  whereas elsewhere it does the right thing e.g other arches:

  -       if (in_atomic() || !mm || current->pagefault_disabled)
  +       if (!mm || pagefault_disabled())

i.e. because of the linebreak it misses the tsk->pagefault_disabled
and leaves it unconverted.

So fix that up and use pagefault_disabled() as intended.

Signed-off-by: Tom Zanussi <redacted>
---
 arch/s390/mm/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 43ec237a17e2..466154e1dfc0 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -436,7 +436,7 @@ static inline int do_exception(struct pt_regs *regs, int access)
 	 */
 	fault = VM_FAULT_BADCONTEXT;
 	if (unlikely(!user_space_fault(regs) || !mm ||
-		     tsk->pagefault_disabled))
+		     pagefault_disabled()))
 		goto out;
 
 	address = trans_exc_code & __FAIL_ADDR_MASK;
-- 
2.14.1

```
