Commit 865f1360 authored by Barry Song's avatar Barry Song Committed by Matthias Männich
Browse files

ANDROID: mm: Fix `Bad swap file entry` errors



We should check if the entry is really a swap entry before calling
swp_swapcount(), otherwise, we get numerous errors:

[  156.666623] _swap_info_get: Bad swap file entry 7800003000042d93
[  156.670877] _swap_info_get: Bad swap file entry 7800002000042d12
[  156.680455] _swap_info_get: Bad swap file entry 7800002000042d4c
[  156.681249] _swap_info_get: Bad swap file entry 7800002000042d01
[  156.684532] _swap_info_get: Bad swap file entry 7800002000042d42
[  156.693004] _swap_info_get: Bad swap file entry 7800002000042d63
[  156.711477] _swap_info_get: Bad swap file entry 7800002000042d25
[  156.817094] _swap_info_get: Bad swap file entry 7800003000042ff2
[  156.830683] _swap_info_get: Bad swap file entry 7800003000042fb4
[  156.844257] _swap_info_get: Bad swap file entry 7800002000042fe4
[  156.845146] _swap_info_get: Bad swap file entry 7800002000042ed5
[  156.846500] _swap_info_get: Bad swap file entry 7800002000042f0a
[  156.862024] _swap_info_get: Bad swap file entry 7800002000042f98
[  156.862511] _swap_info_get: Bad swap file entry 7800002000042f2b
[  156.864571] _swap_info_get: Bad swap file entry 7800002000042e52
[  157.122137] _swap_info_get: Bad swap file entry 78000020000435ca
[  157.340416] _swap_info_get: Bad swap file entry 7800002000043858

Bug: 313807618
Bug: 387424485
Fixes: 9db4e989 ("ANDROID: mm: add vendor hooks in madvise for swap entry")
Change-Id: Id3249ba6e7ab2439ea5ef92ae1bd24d79d8a29bb
Signed-off-by: default avatarBarry Song <v-songbaohua@oppo.com>
Signed-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
(cherry picked from commit 119351fe)
parent 1101f76f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment