On 4/27/23 08:57, Yi Zhang wrote: > On Thu, Apr 27, 2023 at 6:58 PM Chaitanya Kulkarni > <chaitanyak@xxxxxxxxxx> wrote: >> On 4/27/23 00:39, Yi Zhang wrote: >>> oops, the kmemleak still exists: >> hmmm, problem is I'm not able to reproduce >> nvme_ctrl_dhchap_secret_store(), I could only get >> cdev ad dev_pm_ops_xxxx. Let's see if following fixes >> nvme_ctrl_dhchap_secret_store() case ? as I've added one >> missing kfree() from earlier fix .. > Hi Chaitanya > > The kmemleak in nvme_ctrl_dhchap_secret_store was fixed with the > change, feel free to add: > > Tested-by: Yi Zhang <yi.zhang@xxxxxxxxxx> > > I was able to fix remaining memleaks from for blktests nvme/044-nvme/045 with nvme-loop and nvme-tcp transport. I've tested following patch with blktests and memleak on, also specifically tested two testcases in question, whenever you have time see if this fixes all issues, below are the logs from my testing, here is the patch :- linux-block (for-next) # git diff diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 42e90d00fc40..245a832f4df5 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -5151,6 +5151,10 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev, BUILD_BUG_ON(NVME_DSM_MAX_RANGES * sizeof(struct nvme_dsm_range) > PAGE_SIZE); + ret = nvme_auth_init_ctrl(ctrl); + if (ret) + return ret; + ctrl->discard_page = alloc_page(GFP_KERNEL); if (!ctrl->discard_page) { ret = -ENOMEM; @@ -5195,13 +5199,8 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev, nvme_fault_inject_init(&ctrl->fault_inject, dev_name(ctrl->device)); nvme_mpath_init_ctrl(ctrl); - ret = nvme_auth_init_ctrl(ctrl); - if (ret) - goto out_free_cdev; return 0; -out_free_cdev: - cdev_device_del(&ctrl->cdev, ctrl->device); out_free_name: nvme_put_ctrl(ctrl); kfree_const(ctrl->device->kobj.name); -ck linux-block (for-next) # git diff diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 42e90d00fc40..245a832f4df5 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -5151,6 +5151,10 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev, BUILD_BUG_ON(NVME_DSM_MAX_RANGES * sizeof(struct nvme_dsm_range) > PAGE_SIZE); + ret = nvme_auth_init_ctrl(ctrl); + if (ret) + return ret; + ctrl->discard_page = alloc_page(GFP_KERNEL); if (!ctrl->discard_page) { ret = -ENOMEM; @@ -5195,13 +5199,8 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev, nvme_fault_inject_init(&ctrl->fault_inject, dev_name(ctrl->device)); nvme_mpath_init_ctrl(ctrl); - ret = nvme_auth_init_ctrl(ctrl); - if (ret) - goto out_free_cdev; return 0; -out_free_cdev: - cdev_device_del(&ctrl->cdev, ctrl->device); out_free_name: nvme_put_ctrl(ctrl); kfree_const(ctrl->device->kobj.name); linux-block (for-next) # linux-block (for-next) # linux-block (for-next) # linux-block (for-next) # linux-block (for-next) # linux-block (for-next) # linux-block (for-next) # cat /proc/cmdline BOOT_IMAGE=(hd0,msdos1)/vmlinuz-6.3.0+ root=UUID=e5f9bccb-cc5d-4577-8f74-fddb710fae7f ro rootflags=subvol=root rhgb quiet console=ttyS0,115200 kgdboc=ttyS0,115200 nokaslr kmemleak=on linux-block (for-next) # linux-block (for-next) # linux-block (for-next) # linux-block (for-next) # linux-block (for-next) # linux-block (for-next) # linux-block (for-next) # ./compile_nvme.sh + umount /mnt/nvme0n1 + clear_dmesg ./compile_nvme.sh: line 3: clear_dmesg: command not found umount: /mnt/nvme0n1: no mount point specified. + rmmod host/tets_verify.ko rmmod: ERROR: Module host/tets_verify is not currently loaded + modprobe -r nvme-fabrics + modprobe -r nvme_loop + modprobe -r nvmet + modprobe -r nvme + sleep 1 + modprobe -r nvme-core + lsmod + grep nvme ++ nproc + make -j 48 M=drivers/nvme/ modules /lib/modules/6.3.0+/kernel/drivers/nvme/host/: total 7.5M -rw-r--r--. 1 root root 3.5M May 1 00:49 nvme-core.ko -rw-r--r--. 1 root root 477K May 1 00:49 nvme-fabrics.ko -rw-r--r--. 1 root root 974K May 1 00:49 nvme-fc.ko -rw-r--r--. 1 root root 783K May 1 00:49 nvme.ko -rw-r--r--. 1 root root 926K May 1 00:49 nvme-rdma.ko -rw-r--r--. 1 root root 902K May 1 00:49 nvme-tcp.ko /lib/modules/6.3.0+/kernel/drivers/nvme/target//: total 7.4M -rw-r--r--. 1 root root 532K May 1 00:49 nvme-fcloop.ko -rw-r--r--. 1 root root 469K May 1 00:49 nvme-loop.ko -rw-r--r--. 1 root root 799K May 1 00:49 nvmet-fc.ko -rw-r--r--. 1 root root 4.0M May 1 00:49 nvmet.ko -rw-r--r--. 1 root root 892K May 1 00:49 nvmet-rdma.ko -rw-r--r--. 1 root root 753K May 1 00:49 nvmet-tcp.ko + modprobe nvme + dmesg -c [ 124.012407] nvme 0000:00:04.0: vgaarb: pci_notify [ 124.274357] pci 0000:00:04.0: vgaarb: pci_notify [ 127.055054] nvme 0000:00:04.0: vgaarb: pci_notify [ 127.055093] nvme 0000:00:04.0: runtime IRQ mapping not provided by arch [ 127.056594] nvme nvme0: pci function 0000:00:04.0 [ 127.258570] nvme 0000:00:04.0: enabling bus mastering [ 127.259413] nvme 0000:00:04.0: saving config space at offset 0x0 (reading 0x101b36) [ 127.259433] nvme 0000:00:04.0: saving config space at offset 0x4 (reading 0x100507) [ 127.259439] nvme 0000:00:04.0: saving config space at offset 0x8 (reading 0x1080202) [ 127.259444] nvme 0000:00:04.0: saving config space at offset 0xc (reading 0x0) [ 127.259448] nvme 0000:00:04.0: saving config space at offset 0x10 (reading 0xfebd0004) [ 127.259453] nvme 0000:00:04.0: saving config space at offset 0x14 (reading 0x0) [ 127.259458] nvme 0000:00:04.0: saving config space at offset 0x18 (reading 0x0) [ 127.259463] nvme 0000:00:04.0: saving config space at offset 0x1c (reading 0x0) [ 127.259467] nvme 0000:00:04.0: saving config space at offset 0x20 (reading 0x0) [ 127.259473] nvme 0000:00:04.0: saving config space at offset 0x24 (reading 0x0) [ 127.259477] nvme 0000:00:04.0: saving config space at offset 0x28 (reading 0x0) [ 127.259482] nvme 0000:00:04.0: saving config space at offset 0x2c (reading 0x11001af4) [ 127.259486] nvme 0000:00:04.0: saving config space at offset 0x30 (reading 0x0) [ 127.259491] nvme 0000:00:04.0: saving config space at offset 0x34 (reading 0x40) [ 127.259495] nvme 0000:00:04.0: saving config space at offset 0x38 (reading 0x0) [ 127.259500] nvme 0000:00:04.0: saving config space at offset 0x3c (reading 0x10b) [ 127.279599] nvme nvme0: 48/0/0 default/read/poll queues [ 127.286872] nvme nvme0: Ignoring bogus Namespace Identifiers [ 127.301631] nvme 0000:00:04.0: vgaarb: pci_notify linux-block (for-next) # cdblktests blktests (master) # sh ./test-memleak modprobe: FATAL: Module kmemleak-test not found in directory /lib/modules/6.3.0+ modprobe: FATAL: Module kmemleak-test not found. + for transport in loop tcp + echo '################nvme_trtype=loop############' ################nvme_trtype=loop############ ++ seq 1 10 + for i in `seq 1 10` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 1.486s ... 2.195s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.716s ... 6.905s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.195s ... 2.086s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 6.905s ... 4.687s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.086s ... 2.094s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 4.687s ... 4.746s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.094s ... 2.125s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 4.746s ... 5.240s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.125s ... 2.110s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.240s ... 4.592s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.110s ... 2.075s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 4.592s ... 4.734s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.075s ... 2.054s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 4.734s ... 4.757s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.054s ... 2.084s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 4.757s ... 4.751s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.084s ... 2.100s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 4.751s ... 4.832s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.100s ... 2.065s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 4.832s ... 4.814s + echo scan + cat /sys/kernel/debug/kmemleak + for transport in loop tcp + echo '################nvme_trtype=tcp############' ################nvme_trtype=tcp############ ++ seq 1 10 + for i in `seq 1 10` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.065s ... 1.472s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 4.814s ... 5.601s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 1.472s ... 1.478s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.601s ... 5.615s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 1.478s ... 1.494s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.615s ... 5.638s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 1.494s ... 1.488s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.638s ... 5.572s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 1.488s ... 1.489s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.572s ... 5.572s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 1.489s ... 1.457s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.572s ... 5.597s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 1.457s ... 1.500s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.597s ... 5.583s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 1.500s ... 1.480s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.583s ... 5.597s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 1.480s ... 1.491s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.597s ... 5.584s + echo scan + cat /sys/kernel/debug/kmemleak + for i in `seq 1 10` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 1.491s ... 1.471s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.584s ... 5.586s + echo scan + cat /sys/kernel/debug/kmemleak + for transport in loop tcp + echo '################nvme_trtype=loop############' ################nvme_trtype=loop############ + echo clear + nvme_trtype=loop + ./check nvme/ nvme/002 (create many subsystems and test discovery) [passed] runtime ... 35.769s nvme/003 (test if we're sending keep-alives to a discovery controller) [passed] runtime 10.155s ... 10.152s nvme/004 (test nvme and nvmet UUID NS descriptors) [passed] runtime 1.282s ... 1.588s nvme/005 (reset local loopback target) [passed] runtime 1.368s ... 1.957s nvme/006 (create an NVMeOF target with a block device-backed ns) [passed] runtime 0.107s ... 0.114s nvme/007 (create an NVMeOF target with a file-backed ns) [passed] runtime 0.083s ... 0.067s nvme/008 (create an NVMeOF host with a block device-backed ns) [passed] runtime 1.297s ... 1.642s nvme/009 (create an NVMeOF host with a file-backed ns) [passed] runtime 1.278s ... 1.577s nvme/010 (run data verification fio job on NVMeOF block device-backed ns) [passed] runtime 102.287s ... 87.668s nvme/011 (run data verification fio job on NVMeOF file-backed ns) [passed] runtime 93.770s ... 83.243s nvme/012 (run mkfs and data verification fio job on NVMeOF block device-backed ns) [passed] runtime 80.527s ... 74.513s nvme/013 (run mkfs and data verification fio job on NVMeOF file-backed ns) [passed] runtime 83.463s ... 82.201s nvme/014 (flush a NVMeOF block device-backed ns) [passed] runtime 5.563s ... 5.878s nvme/015 (unit test for NVMe flush for file backed ns) [passed] runtime 4.043s ... 4.513s nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [passed] runtime ... 18.275s nvme/017 (create/delete many file-ns and test discovery) [passed] runtime ... 18.579s nvme/018 (unit test NVMe-oF out of range access on a file backend) [passed] runtime 1.275s ... 1.582s nvme/019 (test NVMe DSM Discard command on NVMeOF block-device ns) [passed] runtime 1.286s ... 1.599s nvme/020 (test NVMe DSM Discard command on NVMeOF file-backed ns) [passed] runtime 1.271s ... 1.571s nvme/021 (test NVMe list command on NVMeOF file-backed ns) [passed] runtime 1.258s ... 1.555s nvme/022 (test NVMe reset command on NVMeOF file-backed ns) [passed] runtime 1.327s ... 1.936s nvme/023 (test NVMe smart-log command on NVMeOF block-device ns) [passed] runtime 1.302s ... 1.610s nvme/024 (test NVMe smart-log command on NVMeOF file-backed ns) [passed] runtime 1.253s ... 1.572s nvme/025 (test NVMe effects-log command on NVMeOF file-backed ns) [passed] runtime 1.250s ... 1.560s nvme/026 (test NVMe ns-descs command on NVMeOF file-backed ns) [passed] runtime 1.255s ... 1.567s nvme/027 (test NVMe ns-rescan command on NVMeOF file-backed ns) [passed] runtime 1.270s ... 1.594s nvme/028 (test NVMe list-subsys command on NVMeOF file-backed ns) [passed] runtime 1.282s ... 1.573s nvme/029 (test userspace IO via nvme-cli read/write interface) [passed] runtime 1.562s ... 1.893s nvme/030 (ensure the discovery generation counter is updated appropriately) [passed] runtime 0.274s ... 0.328s nvme/031 (test deletion of NVMeOF controllers immediately after setup) [passed] runtime 1.427s ... 4.514s nvme/038 (test deletion of NVMeOF subsystem without enabling) [passed] runtime 0.044s ... 0.031s nvme/040 (test nvme fabrics controller reset/disconnect operation during I/O) [passed] runtime 7.377s ... 8.120s nvme/041 (Create authenticated connections) [passed] runtime 1.088s ... 1.351s nvme/042 (Test dhchap key types for authenticated connections) [passed] runtime 6.691s ... 8.555s nvme/043 (Test hash and DH group variations for authenticated connections) [passed] runtime 1.346s ... 5.423s nvme/044 (Test bi-directional authentication) [passed] runtime 1.471s ... 2.156s nvme/045 (Test re-authentication) [passed] runtime 5.586s ... 4.742s nvme/047 (test different queue types for fabric transports) [not run] runtime 1.785s ... nvme_trtype=loop is not supported in this test nvme/048 (Test queue count changes on reconnect) [not run] runtime 5.549s ... nvme_trtype=loop is not supported in this test + echo scan + cat /sys/kernel/debug/kmemleak + for transport in loop tcp + echo '################nvme_trtype=tcp############' ################nvme_trtype=tcp############ + echo clear + nvme_trtype=tcp + ./check nvme/ nvme/002 (create many subsystems and test discovery) [not run] runtime 35.769s ... nvme_trtype=tcp is not supported in this test nvme/003 (test if we're sending keep-alives to a discovery controller) [passed] runtime 10.152s ... 10.166s nvme/004 (test nvme and nvmet UUID NS descriptors) [passed] runtime 1.588s ... 1.280s nvme/005 (reset local loopback target) [passed] runtime 1.957s ... 1.378s nvme/006 (create an NVMeOF target with a block device-backed ns) [passed] runtime 0.114s ... 0.109s nvme/007 (create an NVMeOF target with a file-backed ns) [passed] runtime 0.067s ... 0.074s nvme/008 (create an NVMeOF host with a block device-backed ns) [passed] runtime 1.642s ... 1.289s nvme/009 (create an NVMeOF host with a file-backed ns) [passed] runtime 1.577s ... 1.266s nvme/010 (run data verification fio job on NVMeOF block device-backed ns) [passed] runtime 87.668s ... 79.153s nvme/011 (run data verification fio job on NVMeOF file-backed ns) [passed] runtime 83.243s ... 91.240s nvme/012 (run mkfs and data verification fio job on NVMeOF block device-backed ns) [passed] runtime 74.513s ... 79.656s nvme/013 (run mkfs and data verification fio job on NVMeOF file-backed ns) [passed] runtime 82.201s ... 88.545s nvme/014 (flush a NVMeOF block device-backed ns) [passed] runtime 5.878s ... 5.557s nvme/015 (unit test for NVMe flush for file backed ns) [passed] runtime 4.513s ... 3.911s nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [not run] runtime 18.275s ... nvme_trtype=tcp is not supported in this test nvme/017 (create/delete many file-ns and test discovery) [not run] runtime 18.579s ... nvme_trtype=tcp is not supported in this test nvme/018 (unit test NVMe-oF out of range access on a file backend) [passed] runtime 1.582s ... 1.268s nvme/019 (test NVMe DSM Discard command on NVMeOF block-device ns) [passed] runtime 1.599s ... 1.294s nvme/020 (test NVMe DSM Discard command on NVMeOF file-backed ns) [passed] runtime 1.571s ... 1.267s nvme/021 (test NVMe list command on NVMeOF file-backed ns) [passed] runtime 1.555s ... 1.258s nvme/022 (test NVMe reset command on NVMeOF file-backed ns) [passed] runtime 1.936s ... 1.350s nvme/023 (test NVMe smart-log command on NVMeOF block-device ns) [passed] runtime 1.610s ... 1.301s nvme/024 (test NVMe smart-log command on NVMeOF file-backed ns) [passed] runtime 1.572s ... 1.260s nvme/025 (test NVMe effects-log command on NVMeOF file-backed ns) [passed] runtime 1.560s ... 1.267s nvme/026 (test NVMe ns-descs command on NVMeOF file-backed ns) [passed] runtime 1.567s ... 1.270s nvme/027 (test NVMe ns-rescan command on NVMeOF file-backed ns) [passed] runtime 1.594s ... 1.272s nvme/028 (test NVMe list-subsys command on NVMeOF file-backed ns) [passed] runtime 1.573s ... 1.260s nvme/029 (test userspace IO via nvme-cli read/write interface) [passed] runtime 1.893s ... 1.540s nvme/030 (ensure the discovery generation counter is updated appropriately) [passed] runtime 0.328s ... 0.266s nvme/031 (test deletion of NVMeOF controllers immediately after setup) [passed] runtime 4.514s ... 1.385s nvme/038 (test deletion of NVMeOF subsystem without enabling) [passed] runtime 0.031s ... 0.040s nvme/040 (test nvme fabrics controller reset/disconnect operation during I/O) [passed] runtime 8.120s ... 7.384s nvme/041 (Create authenticated connections) [passed] runtime 1.351s ... 1.035s nvme/042 (Test dhchap key types for authenticated connections) [passed] runtime 8.555s ... 6.533s nvme/043 (Test hash and DH group variations for authenticated connections) [passed] runtime 5.423s ... 1.321s nvme/044 (Test bi-directional authentication) [passed] runtime 2.156s ... 1.497s nvme/045 (Test re-authentication) [passed] runtime 4.742s ... 5.633s nvme/047 (test different queue types for fabric transports) [passed] runtime ... 2.213s nvme/048 (Test queue count changes on reconnect) [passed] runtime ... 5.507s + echo scan + cat /sys/kernel/debug/kmemleak blktests (master) # Without the fix :- blktests (master) # sh test-memleak + for transport in loop tcp + echo '################nvme_trtype=loop############' ################nvme_trtype=loop############ ++ seq 1 2 + for i in `seq 1 2` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.117s ... 2.063s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 4.642s ... 4.638s + echo scan + cat /sys/kernel/debug/kmemleak unreferenced object 0xffff88817949cb40 (size 96): comm "nvme", pid 38795, jiffies 4296649589 (age 10.273s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000bb3e4509>] kmalloc_trace+0x25/0x90 [<000000000c352c8d>] dev_pm_qos_update_user_latency_tolerance+0x6f/0x100 [<0000000014aec0f3>] nvme_init_ctrl+0x38a/0x400 [nvme_core] [<000000001ada0f52>] 0xffffffffc0a428b3 [<000000000b6031a5>] 0xffffffffc055a4cb [<000000008adf2100>] vfs_write+0xc5/0x3c0 [<000000005037c347>] ksys_write+0x5f/0xe0 [<000000007b6b8e18>] do_syscall_64+0x3b/0x90 [<00000000fef52c0f>] entry_SYSCALL_64_after_hwframe+0x72/0xdc + for i in `seq 1 2` + echo clear + nvme_trtype=loop + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.063s ... 2.126s + nvme_trtype=loop + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 4.638s ... 4.740s + echo scan + cat /sys/kernel/debug/kmemleak unreferenced object 0xffff8881210e7e00 (size 256): comm "nvme", pid 38795, jiffies 4296649589 (age 23.146s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 08 7e 0e 21 81 88 ff ff .........~.!.... 08 7e 0e 21 81 88 ff ff 40 d7 9c 81 ff ff ff ff .~.!....@....... backtrace: [<00000000bb3e4509>] kmalloc_trace+0x25/0x90 [<00000000e8f2ff7e>] device_add+0x4cf/0x850 [<0000000025c90eb3>] cdev_device_add+0x44/0x90 [<000000004bb481f7>] nvme_init_ctrl+0x352/0x400 [nvme_core] [<000000001ada0f52>] 0xffffffffc0a428b3 [<000000000b6031a5>] 0xffffffffc055a4cb [<000000008adf2100>] vfs_write+0xc5/0x3c0 [<000000005037c347>] ksys_write+0x5f/0xe0 [<000000007b6b8e18>] do_syscall_64+0x3b/0x90 [<00000000fef52c0f>] entry_SYSCALL_64_after_hwframe+0x72/0xdc unreferenced object 0xffff88810ddbade0 (size 96): comm "nvme", pid 39119, jiffies 4296662383 (age 10.353s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000bb3e4509>] kmalloc_trace+0x25/0x90 [<000000000c352c8d>] dev_pm_qos_update_user_latency_tolerance+0x6f/0x100 [<0000000014aec0f3>] nvme_init_ctrl+0x38a/0x400 [nvme_core] [<000000001ada0f52>] 0xffffffffc0a428b3 [<000000000b6031a5>] 0xffffffffc055a4cb [<000000008adf2100>] vfs_write+0xc5/0x3c0 [<000000005037c347>] ksys_write+0x5f/0xe0 [<000000007b6b8e18>] do_syscall_64+0x3b/0x90 [<00000000fef52c0f>] entry_SYSCALL_64_after_hwframe+0x72/0xdc + for transport in loop tcp + echo '################nvme_trtype=tcp############' ################nvme_trtype=tcp############ ++ seq 1 2 + for i in `seq 1 2` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 2.126s ... 1.473s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 4.740s ... 5.701s + echo scan + cat /sys/kernel/debug/kmemleak unreferenced object 0xffff8882682e6000 (size 256): comm "nvme", pid 39119, jiffies 4296662383 (age 23.568s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 08 60 2e 68 82 88 ff ff .........`.h.... 08 60 2e 68 82 88 ff ff 40 d7 9c 81 ff ff ff ff .`.h....@....... backtrace: [<00000000bb3e4509>] kmalloc_trace+0x25/0x90 [<00000000e8f2ff7e>] device_add+0x4cf/0x850 [<0000000025c90eb3>] cdev_device_add+0x44/0x90 [<000000004bb481f7>] nvme_init_ctrl+0x352/0x400 [nvme_core] [<000000001ada0f52>] 0xffffffffc0a428b3 [<000000000b6031a5>] 0xffffffffc055a4cb [<000000008adf2100>] vfs_write+0xc5/0x3c0 [<000000005037c347>] ksys_write+0x5f/0xe0 [<000000007b6b8e18>] do_syscall_64+0x3b/0x90 [<00000000fef52c0f>] entry_SYSCALL_64_after_hwframe+0x72/0xdc unreferenced object 0xffff8881061229c0 (size 96): comm "nvme", pid 39541, jiffies 4296674602 (age 11.349s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000bb3e4509>] kmalloc_trace+0x25/0x90 [<000000000c352c8d>] dev_pm_qos_update_user_latency_tolerance+0x6f/0x100 [<0000000014aec0f3>] nvme_init_ctrl+0x38a/0x400 [nvme_core] [<00000000dd15d26e>] 0xffffffffc09fc9ae [<000000000b6031a5>] 0xffffffffc055a4cb [<000000008adf2100>] vfs_write+0xc5/0x3c0 [<000000005037c347>] ksys_write+0x5f/0xe0 [<000000007b6b8e18>] do_syscall_64+0x3b/0x90 [<00000000fef52c0f>] entry_SYSCALL_64_after_hwframe+0x72/0xdc + for i in `seq 1 2` + echo clear + nvme_trtype=tcp + ./check nvme/044 nvme/044 (Test bi-directional authentication) [passed] runtime 1.473s ... 1.506s + nvme_trtype=tcp + ./check nvme/045 nvme/045 (Test re-authentication) [passed] runtime 5.701s ... 5.652s + echo scan + cat /sys/kernel/debug/kmemleak unreferenced object 0xffff888248f3fb00 (size 256): comm "nvme", pid 39541, jiffies 4296674601 (age 24.645s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 08 fb f3 48 82 88 ff ff ...........H.... 08 fb f3 48 82 88 ff ff 40 d7 9c 81 ff ff ff ff ...H....@....... backtrace: [<00000000bb3e4509>] kmalloc_trace+0x25/0x90 [<00000000e8f2ff7e>] device_add+0x4cf/0x850 [<0000000025c90eb3>] cdev_device_add+0x44/0x90 [<000000004bb481f7>] nvme_init_ctrl+0x352/0x400 [nvme_core] [<00000000dd15d26e>] 0xffffffffc09fc9ae [<000000000b6031a5>] 0xffffffffc055a4cb [<000000008adf2100>] vfs_write+0xc5/0x3c0 [<000000005037c347>] ksys_write+0x5f/0xe0 [<000000007b6b8e18>] do_syscall_64+0x3b/0x90 [<00000000fef52c0f>] entry_SYSCALL_64_after_hwframe+0x72/0xdc unreferenced object 0xffff8881050bb540 (size 96): comm "nvme", pid 40046, jiffies 4296687837 (age 11.409s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000bb3e4509>] kmalloc_trace+0x25/0x90 [<000000000c352c8d>] dev_pm_qos_update_user_latency_tolerance+0x6f/0x100 [<0000000014aec0f3>] nvme_init_ctrl+0x38a/0x400 [nvme_core] [<00000000dd15d26e>] 0xffffffffc09fc9ae [<000000000b6031a5>] 0xffffffffc055a4cb [<000000008adf2100>] vfs_write+0xc5/0x3c0 [<000000005037c347>] ksys_write+0x5f/0xe0 [<000000007b6b8e18>] do_syscall_64+0x3b/0x90 [<00000000fef52c0f>] entry_SYSCALL_64_after_hwframe+0x72/0xdc