aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
authorLinus Torvalds <torvalds@linux-foundation.org>2025-04-25 11:34:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-04-25 11:34:39 -0700
commit7deea5634a67700d04c2a0e6d2ffa0e2956fe8ad (patch)
tree7b59dfa2b1e8c28ab5354753e8a021837de6acbf /drivers/nvme
parent0537fbb6ecae857ee862e88a6ead1ff2f918b67f (diff)
parentf40139fde5278d81af3227444fd6e76a76b9506d (diff)
downloadath-7deea5634a67700d04c2a0e6d2ffa0e2956fe8ad.tar.gz
Merge tag 'block-6.15-20250424' of git://git.kernel.dk/linux
Pull block fixes from Jens Axboe: - Fix autoloading of drivers from stat*(2) - Fix losing read-ahead setting one suspend/resume, when a device is re-probed. - Fix race between setting the block size and page cache updates. Includes a helper that a coming XFS fix will use as well. - ublk cancelation fixes. - ublk selftest additions and fixes. - NVMe pull via Christoph: - fix an out-of-bounds access in nvmet_enable_port (Richard Weinberger) * tag 'block-6.15-20250424' of git://git.kernel.dk/linux: ublk: fix race between io_uring_cmd_complete_in_task and ublk_cancel_cmd ublk: call ublk_dispatch_req() for handling UBLK_U_IO_NEED_GET_DATA block: don't autoload drivers on blk-cgroup configuration block: don't autoload drivers on stat block: remove the backing_inode variable in bdev_statx block: move blkdev_{get,put} _no_open prototypes out of blkdev.h block: never reduce ra_pages in blk_apply_bdi_limits selftests: ublk: common: fix _get_disk_dev_t for pre-9.0 coreutils selftests: ublk: remove useless 'delay_us' from 'struct dev_ctx' selftests: ublk: fix recover test block: hoist block size validation code to a separate function block: fix race between set_blocksize and read paths nvmet: fix out-of-bounds access in nvmet_enable_port
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/target/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 71f8d06998d60..245475c43127f 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -324,6 +324,9 @@ int nvmet_enable_port(struct nvmet_port *port)
lockdep_assert_held(&nvmet_config_sem);
+ if (port->disc_addr.trtype == NVMF_TRTYPE_MAX)
+ return -EINVAL;
+
ops = nvmet_transports[port->disc_addr.trtype];
if (!ops) {
up_write(&nvmet_config_sem);