On Sun, Apr 23, 2023 at 10:15 PM Sagi Grimberg <sagi@xxxxxxxxxxx> wrote: > > > > Hello > > > > Below kmemleak observed after blktests nvme-tcp, pls help check it, thanks. > > > > commit: linux-block/for-next > > aaf9cff31abe (origin/for-next) Merge branch 'for-6.4/io_uring' into for-next > > Hey Yi, > > Is this a regression? I'm not sure, but both can be reproduced on 6.2.0 > And can you correlate to specific tests that trigger this? > Yes, just run blktests nvme-tcp nvme/044 nvme/045 could trigger them: nvme/044 unreferenced object 0xffff8881911f7800 (size 512): comm "nvme", pid 8233, jiffies 4295443413 (age 157.206s) hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... ff ff ff ff ff ff ff ff 60 70 79 9b ff ff ff ff ........`py..... backtrace: [<ffffffff93767af7>] kmalloc_trace+0x27/0xe0 [<ffffffff94568e85>] device_add+0x645/0x12f0 [<ffffffff939c6fa3>] cdev_device_add+0xf3/0x230 [<ffffffffc0a697c6>] nvme_init_ctrl+0xbe6/0x1140 [nvme_core] [<ffffffffc1f6ce0c>] 0xffffffffc1f6ce0c [<ffffffffc1f4d177>] 0xffffffffc1f4d177 [<ffffffffc1f4d613>] 0xffffffffc1f4d613 [<ffffffff939b8716>] vfs_write+0x216/0xc60 [<ffffffff939b99a9>] ksys_write+0xf9/0x1d0 [<ffffffff95378c4c>] do_syscall_64+0x5c/0x90 [<ffffffff954000aa>] entry_SYSCALL_64_after_hwframe+0x72/0xdc unreferenced object 0xffff8882297fc780 (size 96): comm "nvme", pid 8233, jiffies 4295443414 (age 157.205s) 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: [<ffffffff93767af7>] kmalloc_trace+0x27/0xe0 [<ffffffff94599560>] dev_pm_qos_update_user_latency_tolerance+0xe0/0x200 [<ffffffffc0a6983c>] nvme_init_ctrl+0xc5c/0x1140 [nvme_core] [<ffffffffc1f6ce0c>] 0xffffffffc1f6ce0c [<ffffffffc1f4d177>] 0xffffffffc1f4d177 [<ffffffffc1f4d613>] 0xffffffffc1f4d613 [<ffffffff939b8716>] vfs_write+0x216/0xc60 [<ffffffff939b99a9>] ksys_write+0xf9/0x1d0 [<ffffffff95378c4c>] do_syscall_64+0x5c/0x90 [<ffffffff954000aa>] entry_SYSCALL_64_after_hwframe+0x72/0xdc nvme/045 unreferenced object 0xffff8881e3b32200 (size 64): comm "check", pid 8335, jiffies 4295703407 (age 177.101s) hex dump (first 32 bytes): 44 48 48 43 2d 31 3a 30 30 3a 77 59 5a 2f 37 4f DHHC-1:00:wYZ/7O 4f 33 2b 71 34 74 6c 38 45 6c 73 71 59 68 55 41 O3+q4tl8ElsqYhUA backtrace: [<ffffffff937683fb>] __kmalloc+0x4b/0x190 [<ffffffffc0a77830>] nvme_ctrl_dhchap_secret_store+0x110/0x350 [nvme_core] [<ffffffff93bd1708>] kernfs_fop_write_iter+0x358/0x530 [<ffffffff939b8d02>] vfs_write+0x802/0xc60 [<ffffffff939b99a9>] ksys_write+0xf9/0x1d0 [<ffffffff95378c4c>] do_syscall_64+0x5c/0x90 [<ffffffff954000aa>] entry_SYSCALL_64_after_hwframe+0x72/0xdc unreferenced object 0xffff8881e3b32100 (size 64): comm "check", pid 8335, jiffies 4295703468 (age 177.040s) hex dump (first 32 bytes): 44 48 48 43 2d 31 3a 30 30 3a 77 59 5a 2f 37 4f DHHC-1:00:wYZ/7O 4f 33 2b 71 34 74 6c 38 45 6c 73 71 59 68 55 41 O3+q4tl8ElsqYhUA backtrace: [<ffffffff937683fb>] __kmalloc+0x4b/0x190 [<ffffffffc0a77830>] nvme_ctrl_dhchap_secret_store+0x110/0x350 [nvme_core] [<ffffffff93bd1708>] kernfs_fop_write_iter+0x358/0x530 [<ffffffff939b8d02>] vfs_write+0x802/0xc60 [<ffffffff939b99a9>] ksys_write+0xf9/0x1d0 [<ffffffff95378c4c>] do_syscall_64+0x5c/0x90 [<ffffffff954000aa>] entry_SYSCALL_64_after_hwframe+0x72/0xdc > > > > unreferenced object 0xffff88821f0cc880 (size 32): > > comm "kworker/1:2H", pid 3067, jiffies 4295825061 (age 12918.254s) > > hex dump (first 32 bytes): > > 82 0c 38 08 00 ea ff ff 00 00 00 00 00 10 00 00 ..8............. > > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > > backtrace: > > [<ffffffff86f646ab>] __kmalloc+0x4b/0x190 > > [<ffffffff8776d0bf>] sgl_alloc_order+0x7f/0x360 > > [<ffffffffc0ba9875>] 0xffffffffc0ba9875 > > [<ffffffffc0bb068f>] 0xffffffffc0bb068f > > [<ffffffffc0bb2038>] 0xffffffffc0bb2038 > > [<ffffffffc0bb257c>] 0xffffffffc0bb257c > > [<ffffffffc0bb2de3>] 0xffffffffc0bb2de3 > > [<ffffffff86897f49>] process_one_work+0x8b9/0x1550 > > [<ffffffff8689919c>] worker_thread+0x5ac/0xed0 > > [<ffffffff868b2222>] kthread+0x2a2/0x340 > > [<ffffffff866063ac>] ret_from_fork+0x2c/0x50 > > unreferenced object 0xffff88823abb7c00 (size 512): > > comm "nvme", pid 6312, jiffies 4295856007 (age 12887.309s) > > hex dump (first 32 bytes): > > 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... > > ff ff ff ff ff ff ff ff a0 53 5f 8e ff ff ff ff .........S_..... > > backtrace: > > [<ffffffff86f63da7>] kmalloc_trace+0x27/0xe0 > > [<ffffffff87d61205>] device_add+0x645/0x12f0 > > [<ffffffff871c2a73>] cdev_device_add+0xf3/0x230 > > [<ffffffffc09ed7c6>] nvme_init_ctrl+0xbe6/0x1140 [nvme_core] > > [<ffffffffc0b54e0c>] 0xffffffffc0b54e0c > > [<ffffffffc086b177>] 0xffffffffc086b177 > > [<ffffffffc086b613>] 0xffffffffc086b613 > > [<ffffffff871b41e6>] vfs_write+0x216/0xc60 > > [<ffffffff871b5479>] ksys_write+0xf9/0x1d0 > > [<ffffffff88ba8f9c>] do_syscall_64+0x5c/0x90 > > [<ffffffff88c000aa>] entry_SYSCALL_64_after_hwframe+0x72/0xdc > > unreferenced object 0xffff88810ccc9b80 (size 96): > > comm "nvme", pid 6312, jiffies 4295856008 (age 12887.308s) > > 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: > > [<ffffffff86f63da7>] kmalloc_trace+0x27/0xe0 > > [<ffffffff87d918e0>] dev_pm_qos_update_user_latency_tolerance+0xe0/0x200 > > [<ffffffffc09ed83c>] nvme_init_ctrl+0xc5c/0x1140 [nvme_core] > > [<ffffffffc0b54e0c>] 0xffffffffc0b54e0c > > [<ffffffffc086b177>] 0xffffffffc086b177 > > [<ffffffffc086b613>] 0xffffffffc086b613 > > [<ffffffff871b41e6>] vfs_write+0x216/0xc60 > > [<ffffffff871b5479>] ksys_write+0xf9/0x1d0 > > [<ffffffff88ba8f9c>] do_syscall_64+0x5c/0x90 > > [<ffffffff88c000aa>] entry_SYSCALL_64_after_hwframe+0x72/0xdc > > unreferenced object 0xffff8881d1fdb780 (size 64): > > comm "check", pid 6358, jiffies 4295859851 (age 12883.466s) > > hex dump (first 32 bytes): > > 44 48 48 43 2d 31 3a 30 30 3a 4e 46 76 44 6d 75 DHHC-1:00:NFvDmu > > 52 58 77 79 54 79 62 57 78 70 43 4a 45 4a 68 36 RXwyTybWxpCJEJh6 > > backtrace: > > [<ffffffff86f646ab>] __kmalloc+0x4b/0x190 > > [<ffffffffc09fb710>] nvme_ctrl_dhchap_secret_store+0x110/0x350 [nvme_core] > > [<ffffffff873cc848>] kernfs_fop_write_iter+0x358/0x530 > > [<ffffffff871b47d2>] vfs_write+0x802/0xc60 > > [<ffffffff871b5479>] ksys_write+0xf9/0x1d0 > > [<ffffffff88ba8f9c>] do_syscall_64+0x5c/0x90 > > [<ffffffff88c000aa>] entry_SYSCALL_64_after_hwframe+0x72/0xdc > > unreferenced object 0xffff8881d1fdb600 (size 64): > > comm "check", pid 6358, jiffies 4295859908 (age 12883.409s) > > hex dump (first 32 bytes): > > 44 48 48 43 2d 31 3a 30 30 3a 4e 46 76 44 6d 75 DHHC-1:00:NFvDmu > > 52 58 77 79 54 79 62 57 78 70 43 4a 45 4a 68 36 RXwyTybWxpCJEJh6 > > backtrace: > > [<ffffffff86f646ab>] __kmalloc+0x4b/0x190 > > [<ffffffffc09fb710>] nvme_ctrl_dhchap_secret_store+0x110/0x350 [nvme_core] > > [<ffffffff873cc848>] kernfs_fop_write_iter+0x358/0x530 > > [<ffffffff871b47d2>] vfs_write+0x802/0xc60 > > [<ffffffff871b5479>] ksys_write+0xf9/0x1d0 > > [<ffffffff88ba8f9c>] do_syscall_64+0x5c/0x90 > > [<ffffffff88c000aa>] entry_SYSCALL_64_after_hwframe+0x72/0xdc > > > > -- > > Best Regards, > > Yi Zhang > > > -- Best Regards, Yi Zhang