summaryrefslogtreecommitdiff
path: root/include/linux/rtc
diff options
context:
space:
mode:
authorSergey Senozhatsky <senozhatsky@chromium.org>2026-01-07 14:21:44 +0900
committerAndrew Morton <akpm@linux-foundation.org>2026-01-26 20:02:25 -0800
commit0be909f114c4e82a4fe5964851af1ab8889dc76c (patch)
tree865d722060c1227c2f0b3956a7d1d483c982af7a /include/linux/rtc
parent95296536eb19c969e91684287cf3bfcb382221d3 (diff)
zsmalloc: use actual object size to detect spans
Using class->size to detect spanning objects is not entirely correct, because some size classes can hold a range of object sizes of up to class->size bytes in length, due to size-classes merge. Such classes use padding for cases when actually written objects are smaller than class->size. zs_obj_read_begin() can incorrectly hit the slow path and perform memcpy of such objects, basically copying padding bytes. Instead of class->size zs_obj_read_begin() should use the actual compressed object length (both zram and zswap know it) so that it can correctly handle situations when a written object is small enough to fit into the first physical page. Link: https://lkml.kernel.org/r/20260107052145.3586917-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Reviewed-by: Yosry Ahmed <yosry.ahmed@linux.dev> [zsmalloc & zswap] Reviewed-by: Nhat Pham <nphamcs@gmail.com> Cc: Brian Geffon <bgeffon@google.com> Cc: Chengming Zhou <chengming.zhou@linux.dev> Cc: Jens Axboe <axboe@kernel.dk> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/rtc')
0 files changed, 0 insertions, 0 deletions