1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 07:53:11 -05:00
linux/block
Ming Lei 22465bbac5 blk-mq: move cpuhp callback registering out of q->sysfs_lock
Registering and unregistering cpuhp callback requires global cpu hotplug lock,
which is used everywhere. Meantime q->sysfs_lock is used in block layer
almost everywhere.

It is easy to trigger lockdep warning[1] by connecting the two locks.

Fix the warning by moving blk-mq's cpuhp callback registering out of
q->sysfs_lock. Add one dedicated global lock for covering registering &
unregistering hctx's cpuhp, and it is safe to do so because hctx is
guaranteed to be live if our request_queue is live.

[1] https://lore.kernel.org/lkml/Z04pz3AlvI4o0Mr8@agluck-desk3/

Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Peter Newman <peternewman@google.com>
Cc: Babu Moger <babu.moger@amd.com>
Reported-by: Luck Tony <tony.luck@intel.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Tested-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20241206111611.978870-3-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-12-06 09:48:46 -07:00
..
partitions
badblocks.c
bdev.c
bfq-cgroup.c Revert "block, bfq: merge bfq_release_process_ref() into bfq_put_cooperator()" 2024-11-19 19:05:32 -07:00
bfq-iosched.c block, bfq: fix bfqq uaf in bfq_limit_depth() 2024-11-29 08:42:14 -07:00
bfq-iosched.h
bfq-wf2q.c
bio-integrity.c
bio.c
blk-cgroup-fc-appid.c
blk-cgroup-rwstat.c
blk-cgroup-rwstat.h
blk-cgroup.c
blk-cgroup.h
blk-core.c block: add a rq_list type 2024-11-13 12:04:58 -07:00
blk-crypto-fallback.c
blk-crypto-internal.h
blk-crypto-profile.c
blk-crypto-sysfs.c
blk-crypto.c
blk-flush.c
blk-ia-ranges.c
blk-integrity.c
blk-ioc.c
blk-iocost.c
blk-iolatency.c
blk-ioprio.c
blk-ioprio.h
blk-lib.c
blk-map.c
blk-merge.c block: req->bio is always set in the merge code 2024-11-19 19:06:57 -07:00
blk-mq-cpumap.c
blk-mq-debugfs.c
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-sched.c
blk-mq-sched.h
blk-mq-sysfs.c
blk-mq-tag.c
blk-mq-virtio.c
blk-mq.c blk-mq: move cpuhp callback registering out of q->sysfs_lock 2024-12-06 09:48:46 -07:00
blk-mq.h block: add a rq_list type 2024-11-13 12:04:58 -07:00
blk-pm.c
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c block: Support atomic writes limits for stacked devices 2024-11-19 10:30:02 -07:00
blk-stat.c
blk-stat.h
blk-sysfs.c block: fix uaf for flush rq while iterating tags 2024-11-18 18:31:57 -07:00
blk-throttle.c
blk-throttle.h
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c block: Prevent potential deadlock in blk_revalidate_disk_zones() 2024-11-26 07:56:43 -07:00
blk.h
bounce.c
bsg-lib.c
bsg.c
disk-events.c
early-lookup.c
elevator.c
elevator.h
fops.c block: Don't allow an atomic write be truncated in blkdev_write_iter() 2024-11-27 15:04:57 -07:00
genhd.c block: fix uaf for flush rq while iterating tags 2024-11-18 18:31:57 -07:00
holder.c
ioctl.c
ioprio.c
Kconfig
Kconfig.iosched
kyber-iosched.c
Makefile
mq-deadline.c mq-deadline: don't call req_get_ioprio from the I/O completion handler 2024-11-26 07:57:33 -07:00
opal_proto.h
sed-opal.c
t10-pi.c