diff options
| author | Sergey Senozhatsky <[email protected]> | 2023-04-17 22:08:50 +0900 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-04-18 16:29:42 -0700 |
| commit | f7ddb612568361e04d53fcd984d43d1c32c1294a (patch) | |
| tree | d3e93453b37ba48c5ad598a64d3103b654178920 /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | 5f300fd59a2ae90b8a7fb5ed3d5fd43768236c38 (diff) | |
zsmalloc: reset compaction source zspage pointer after putback_zspage()
The current implementation of the compaction loop fails to set the source
zspage pointer to NULL in all cases, leading to a potential issue where
__zs_compact() could use a stale zspage pointer. This pointer could even
point to a previously freed zspage, causing unexpected behavior in the
putback_zspage() and migrate_write_unlock() functions after returning from
the compaction loop.
Address the issue by ensuring that the source zspage pointer is always set
to NULL when it should be.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 5a845e9f2d66 ("zsmalloc: rework compaction algorithm")
Signed-off-by: Sergey Senozhatsky <[email protected]>
Reported-by: Yu Zhao <[email protected]>
Tested-by: Yu Zhao <[email protected]>
Reviewed-by: Yosry Ahmed <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions