[dm-devel] [PATCH v3 00/10] fix delayed holder tracking

Yu Kuai yukuai1 at huaweicloud.com
Tue Nov 15 14:10:44 UTC 2022


From: Yu Kuai <yukuai3 at huawei.com>

Hi all,

this series tries to fix the delayed holder tracking that is only used by
dm by moving it into dm, where we can track the lifetimes much better.
v2 is from Christoph, here I send v3 with some additional fixes.

Changes since v2:
 - add patch 5 8 and 10 to this series.
 - rewrite last cleanup patch from v2.
Changes since v1:
 - don't blow away ->bd_holder_dir in del_gendisk or add_disk failure
   as the holder unregistration references it
 - add an extra cleanup patch

Christoph Hellwig (6):
  block: clear ->slave_dir when dropping the main slave_dir reference
  dm: remove free_table_devices
  dm: cleanup open_table_device
  dm: cleanup close_table_device
  dm: track per-add_disk holder relations in DM
  block: remove delayed holder registration

Yu Kuai (4):
  dm: make sure create and remove dm device won't race with open and
    close table
  block: fix use after free for bd_holder_dir
  block: store the holder kobject in bd_holder_disk
  block: don't allow a disk link holder to itself

 block/genhd.c          |   6 +-
 block/holder.c         | 103 +++++++++++++-----------------
 drivers/md/dm.c        | 138 ++++++++++++++++++++++++-----------------
 include/linux/blkdev.h |   5 --
 4 files changed, 126 insertions(+), 126 deletions(-)

-- 
2.31.1



More information about the dm-devel mailing list