Subject: [BUG -next] "memcg: charge before adding to swapcache on swapin" broken

From: Heiko Carstens <[email-masked]>
Date: Tue, 16 Mar 2021 22:08:40 +0100

Hi Shakeel,

your commit 3a9ca1b0ac0f ("memcg: charge before adding to swapcache on
swapin") in linux-next 20210316 appears to cause user process faults /
crashes on s390 like:

User process fault: interruption code 003b ilc:3 in sshd[2aa15280000+df000]
Failing address: 0000000000000000 TEID: 0000000000000800
Fault in primary space mode while using user ASCE.
AS:00000000966b41c7 R3:0000000000000024 
CPU: 0 PID: 401 Comm: sshd Not tainted 5.12.0-rc3-00048-geba7667a8534 #10
Hardware name: IBM 8561 T01 703 (z/VM 7.2.0)
User PSW : 0705000180000000 0000000000000000
           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:1 AS:0 CC:0 PM:0 RI:0 EA:3
User GPRS: 0000000000000000 fffffffffffff000 0000000000000001 000002aa157b88f0
           000002aa157c43c0 0000000000000000 0000000000000000 0000000000000000
           0000000000000000 0000000000000000 0000000000000000 0000000000000000
           0000000000000000 0000000000000000 0000000000000000 0000000000000000
User Code: Bad PSW.

This was bisected using elfutils selftests:

autoreconf -fi
./configure --enable-maintainer-mode --disable-debuginfod
make -j $(nproc)
cd tests
make -j $(nproc) check