aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorKairui Song <[email protected]>2024-12-10 00:57:15 +0800
committerAndrew Morton <[email protected]>2024-12-18 19:04:44 -0800
commitbe48c412f6ebf38849213c19547bc6d5b692b5e5 (patch)
tree5baf127d3d37c9141229dc514ce8f19bec3d5894 /tools/perf/scripts/python/syscall-counts.py
parentc51a4f11e6d8246590b5e64908c1ed84b33e8ba2 (diff)
zram: refuse to use zero sized block device as backing device
Patch series "zram: fix backing device setup issue", v2. This series fixes two bugs of backing device setting: - ZRAM should reject using a zero sized (or the uninitialized ZRAM device itself) as the backing device. - Fix backing device leaking when removing a uninitialized ZRAM device. This patch (of 2): Setting a zero sized block device as backing device is pointless, and one can easily create a recursive loop by setting the uninitialized ZRAM device itself as its own backing device by (zram0 is uninitialized): echo /dev/zram0 > /sys/block/zram0/backing_dev It's definitely a wrong config, and the module will pin itself, kernel should refuse doing so in the first place. By refusing to use zero sized device we avoided misuse cases including this one above. Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Fixes: 013bf95a83ec ("zram: add interface to specif backing device") Signed-off-by: Kairui Song <[email protected]> Reported-by: Desheng Wu <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions