summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2023-07-31 14:58:36 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-08-04 09:01:31 +0200
commite9714c22c1a8238a85d069b1517941fc723312f7 (patch)
tree17c305b0aff03f1165e18af417029205bfaa8424 /tools/perf/scripts/python/syscall-counts.py
parentd2236f6219fac62ee22d971e06a04148f4eb8cca (diff)
mtd: fix use-after-free in mtd release
I case of partition device_unregister() in mtd_device_release() calls mtd_release() which frees mtd_info structure for partition. All code after device_unregister in mtd_device_release thus uses already freed memory. Move part of code to mtd_release() and restict mtd->dev cleanup to non-partion object. For partition object such cleanup have no sense as partition mtd_info is removed. Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Zhang Xiaoxu <zhangxiaoxu5@huawei.com> Fixes: 19bfa9ebebb5 ("mtd: use refcount to prevent corruption") Reviewed-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230731115836.542747-1-alexander.usyskin@intel.com
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions