mbox series

[V2,0/4] block: fix partition use-after-free and optimization

Message ID 20200508044407.1371907-1-ming.lei@redhat.com (mailing list archive)
Headers show
Series block: fix partition use-after-free and optimization | expand

Message

Ming Lei May 8, 2020, 4:44 a.m. UTC
Hi,

The 1st patch fixes one use-after-free on cached last_lookup partition.

The other 3 patches optimizes partition uses in IO path.

V2:
	- add comment, use part_to_disk() to retrieve disk instead of
	adding one field to hd_struct
	- don't put part in blk_account_io_merge


Ming Lei (4):
  block: fix use-after-free on cached last_lookup partition
  block: only define 'nr_sects_seq' in hd_part for 32bit SMP
  block: re-organize fields of 'struct hd_part'
  block: don't hold part0's refcount in IO path

 block/blk-core.c        | 15 ++-------------
 block/blk-merge.c       |  3 ++-
 block/genhd.c           | 17 +++++++++++++----
 block/partitions/core.c | 14 ++++++++++++--
 include/linux/genhd.h   | 24 +++++++++++++++++-------
 5 files changed, 46 insertions(+), 27 deletions(-)

Cc: Yufen Yu <yuyufen@huawei.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Hou Tao <houtao1@huawei.com>