Activity log for bug #1854550

Date Who What changed Old value New value Message
2019-11-30 06:19:33 Fred Kimmy bug added bug
2019-12-02 02:21:15 Ike Panhc nominated for series kunpeng920/ubuntu-18.04-hwe
2019-12-02 02:21:15 Ike Panhc bug task added kunpeng920/ubuntu-18.04-hwe
2019-12-02 02:21:15 Ike Panhc nominated for series kunpeng920/ubuntu-20.04
2019-12-02 02:21:15 Ike Panhc bug task added kunpeng920/ubuntu-20.04
2019-12-02 02:21:15 Ike Panhc nominated for series kunpeng920/upstream-kernel
2019-12-02 02:21:15 Ike Panhc bug task added kunpeng920/upstream-kernel
2019-12-02 02:27:11 Ike Panhc kunpeng920/upstream-kernel: status New Incomplete
2019-12-02 07:25:51 Andrew Cloke kunpeng920: status New Incomplete
2019-12-02 22:53:07 dann frazier kunpeng920/upstream-kernel: status Incomplete Triaged
2019-12-02 23:03:54 dann frazier nominated for series kunpeng920/ubuntu-18.04
2019-12-02 23:03:54 dann frazier bug task added kunpeng920/ubuntu-18.04
2019-12-02 23:03:54 dann frazier nominated for series kunpeng920/ubuntu-19.10
2019-12-02 23:03:54 dann frazier bug task added kunpeng920/ubuntu-19.10
2019-12-02 23:03:54 dann frazier nominated for series kunpeng920/ubuntu-19.04
2019-12-02 23:03:54 dann frazier bug task added kunpeng920/ubuntu-19.04
2019-12-02 23:04:02 dann frazier kunpeng920/ubuntu-20.04: status New Triaged
2019-12-02 23:04:07 dann frazier kunpeng920/ubuntu-19.10: status New Won't Fix
2019-12-02 23:04:12 dann frazier kunpeng920/ubuntu-18.04-hwe: status New Triaged
2019-12-02 23:04:18 dann frazier kunpeng920/ubuntu-20.04: milestone ubuntu-20.04-ga
2019-12-02 23:04:22 dann frazier kunpeng920/ubuntu-18.04-hwe: milestone ubuntu-18.04.5
2019-12-02 23:04:26 dann frazier kunpeng920/ubuntu-18.04: status New Invalid
2019-12-02 23:04:30 dann frazier kunpeng920/ubuntu-19.04: status New Won't Fix
2019-12-02 23:04:53 dann frazier kunpeng920: status Incomplete Triaged
2019-12-11 00:46:43 dann frazier kunpeng920/upstream-kernel: status Triaged Fix Committed
2019-12-11 00:48:14 dann frazier kunpeng920/ubuntu-20.04: assignee Ike Panhc (ikepanhc)
2019-12-11 00:48:19 dann frazier kunpeng920/ubuntu-18.04-hwe: assignee Ike Panhc (ikepanhc)
2019-12-11 00:48:25 dann frazier kunpeng920: assignee Ike Panhc (ikepanhc)
2019-12-11 21:53:02 dann frazier bug task added linux (Ubuntu)
2019-12-11 21:53:16 dann frazier linux (Ubuntu): status New Triaged
2019-12-11 21:53:22 dann frazier linux (Ubuntu): assignee Ike Panhc (ikepanhc)
2019-12-12 00:13:53 dann frazier kunpeng920/upstream-kernel: milestone linux-v5.5
2020-01-07 05:18:03 Ike Panhc tags ikeradar
2020-01-09 07:48:45 Ike Panhc kunpeng920: status Triaged In Progress
2020-01-09 07:48:50 Ike Panhc kunpeng920/ubuntu-18.04-hwe: status Triaged In Progress
2020-01-09 07:48:53 Ike Panhc kunpeng920/ubuntu-20.04: status Triaged In Progress
2020-01-09 07:48:56 Ike Panhc linux (Ubuntu): status Triaged In Progress
2020-01-09 08:07:48 Ike Panhc description "[Steps to reproduce] Enable memleak, and do as follows: root@(none)$ echo 0 > /sys/devices/platform/HISI0162:01/host0/port-0:0/expander-0:0/port-0:0:10/phy-0:0:10/sas_phy/phy-0:0:10/enable [ 79.857888] hisi_sas_v2_hw HISI0162:01: dev[7:1] is gone root@(none)$ echo scan > /sys/kernel/debug/kmemleak [ 131.656603] kmemleak: 3 new suspected memory leaks (see /sys/kernel/debug/kmemleak) root@(none)$ more /sys/kernel/debug/kmemleak unreferenced object 0xffff041da5c66000 (size 256): comm ""kworker/u128:1"", pid 549, jiffies 4294898543 (age 113.728s) hex dump (first 32 bytes): 00 5e c6 a5 1d 04 ff ff 01 00 00 00 00 00 00 00 .^.............. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<(____ptrval____)>] kmem_cache_alloc+0x188/0x260 [<(____ptrval____)>] bsg_setup_queue+0x48/0x1a8 [<(____ptrval____)>] sas_rphy_add+0x108/0x2d0 [<(____ptrval____)>] sas_probe_devices+0x168/0x208 [<(____ptrval____)>] sas_discover_domain+0x660/0x9c8 [<(____ptrval____)>] process_one_work+0x3f8/0x690 [<(____ptrval____)>] worker_thread+0x70/0x6a0 [<(____ptrval____)>] kthread+0x1b8/0x1c0 [<(____ptrval____)>] ret_from_fork+0x10/0x18 unreferenced object 0xffff041d8c075400 (size 128): comm ""kworker/u128:1"", pid 549, jiffies 4294898543 (age 113.728s) hex dump (first 32 bytes): 00 40 25 97 1d 00 ff ff 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: [<(____ptrval____)>] __kmalloc_node+0x1a8/0x2c8 [<(____ptrval____)>] blk_mq_realloc_tag_set_tags.part.70+0x48/0xd8 [<(____ptrval____)>] blk_mq_alloc_tag_set+0x1dc/0x530 [<(____ptrval____)>] bsg_setup_queue+0xe8/0x1a8 [<(____ptrval____)>] sas_rphy_add+0x108/0x2d0 [<(____ptrval____)>] sas_probe_devices+0x168/0x208 [<(____ptrval____)>] sas_discover_domain+0x660/0x9c8 [<(____ptrval____)>] process_one_work+0x3f8/0x690 [<(____ptrval____)>] worker_thread+0x70/0x6a0 [<(____ptrval____)>] kthread+0x1b8/0x1c0 [<(____ptrval____)>] ret_from_fork+0x10/0x18 unreferenced object 0xffff041da5c65e00 (size 256): comm ""kworker/u128:1"", pid 549, jiffies 4294898543 (age 113.728s) 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: [<(____ptrval____)>] __kmalloc_node+0x1a8/0x2c8 [<(____ptrval____)>] blk_mq_alloc_tag_set+0x254/0x530 [<(____ptrval____)>] bsg_setup_queue+0xe8/0x1a8 [<(____ptrval____)>] sas_rphy_add+0x108/0x2d0 [<(____ptrval____)>] sas_probe_devices+0x168/0x208 [<(____ptrval____)>] sas_discover_domain+0x660/0x9c8 [<(____ptrval____)>] process_one_work+0x3f8/0x690 [<(____ptrval____)>] worker_thread+0x70/0x6a0 [<(____ptrval____)>] kthread+0x1b8/0x1c0 [<(____ptrval____)>] ret_from_fork+0x10/0x18 root@(none)$ [solution] Fix by doing the queue removal in one place - in sas_rphy_remove() - instead of unregistering the queue in sas_rphy_remove() and finally cleaning up the queue in calling blk_cleanup_queue() from sas_end_device_release() or sas_expander_release(). Function bsg_remove_queue() can handle a NULL pointer q, so remove the precheck in sas_rphy_remove(). " scsi: scsi_transport_sas: Fix memory leak when removing devices [Impact] kmemleak detects potential leaks and this is the fix [Test Case] Not known case, regression test on system with SAS host is needed. [Fix] 82ea3e0e12 scsi: scsi_transport_sas: Fix memory leak when removing devices [Regression Risk] Patch is simple and reviewed on upstream. Since modification is for scsi subsystem not on a single driver, applying on focal gives us enough time for test. "[Steps to reproduce] Enable memleak, and do as follows: root@(none)$ echo 0 > /sys/devices/platform/HISI0162:01/host0/port-0:0/expander-0:0/port-0:0:10/phy-0:0:10/sas_phy/phy-0:0:10/enable [ 79.857888] hisi_sas_v2_hw HISI0162:01: dev[7:1] is gone root@(none)$ echo scan > /sys/kernel/debug/kmemleak [ 131.656603] kmemleak: 3 new suspected memory leaks (see /sys/kernel/debug/kmemleak) root@(none)$ more /sys/kernel/debug/kmemleak unreferenced object 0xffff041da5c66000 (size 256):   comm ""kworker/u128:1"", pid 549, jiffies 4294898543 (age 113.728s)   hex dump (first 32 bytes):     00 5e c6 a5 1d 04 ff ff 01 00 00 00 00 00 00 00 .^..............     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................   backtrace:     [<(____ptrval____)>] kmem_cache_alloc+0x188/0x260     [<(____ptrval____)>] bsg_setup_queue+0x48/0x1a8     [<(____ptrval____)>] sas_rphy_add+0x108/0x2d0     [<(____ptrval____)>] sas_probe_devices+0x168/0x208     [<(____ptrval____)>] sas_discover_domain+0x660/0x9c8     [<(____ptrval____)>] process_one_work+0x3f8/0x690     [<(____ptrval____)>] worker_thread+0x70/0x6a0     [<(____ptrval____)>] kthread+0x1b8/0x1c0     [<(____ptrval____)>] ret_from_fork+0x10/0x18 unreferenced object 0xffff041d8c075400 (size 128):   comm ""kworker/u128:1"", pid 549, jiffies 4294898543 (age 113.728s)   hex dump (first 32 bytes):     00 40 25 97 1d 00 ff ff 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:     [<(____ptrval____)>] __kmalloc_node+0x1a8/0x2c8     [<(____ptrval____)>] blk_mq_realloc_tag_set_tags.part.70+0x48/0xd8     [<(____ptrval____)>] blk_mq_alloc_tag_set+0x1dc/0x530     [<(____ptrval____)>] bsg_setup_queue+0xe8/0x1a8     [<(____ptrval____)>] sas_rphy_add+0x108/0x2d0     [<(____ptrval____)>] sas_probe_devices+0x168/0x208     [<(____ptrval____)>] sas_discover_domain+0x660/0x9c8     [<(____ptrval____)>] process_one_work+0x3f8/0x690     [<(____ptrval____)>] worker_thread+0x70/0x6a0     [<(____ptrval____)>] kthread+0x1b8/0x1c0     [<(____ptrval____)>] ret_from_fork+0x10/0x18 unreferenced object 0xffff041da5c65e00 (size 256):   comm ""kworker/u128:1"", pid 549, jiffies 4294898543 (age 113.728s)   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:     [<(____ptrval____)>] __kmalloc_node+0x1a8/0x2c8     [<(____ptrval____)>] blk_mq_alloc_tag_set+0x254/0x530     [<(____ptrval____)>] bsg_setup_queue+0xe8/0x1a8     [<(____ptrval____)>] sas_rphy_add+0x108/0x2d0     [<(____ptrval____)>] sas_probe_devices+0x168/0x208     [<(____ptrval____)>] sas_discover_domain+0x660/0x9c8     [<(____ptrval____)>] process_one_work+0x3f8/0x690     [<(____ptrval____)>] worker_thread+0x70/0x6a0     [<(____ptrval____)>] kthread+0x1b8/0x1c0     [<(____ptrval____)>] ret_from_fork+0x10/0x18 root@(none)$ [solution] Fix by doing the queue removal in one place - in sas_rphy_remove() - instead of unregistering the queue in sas_rphy_remove() and finally cleaning up the queue in calling blk_cleanup_queue() from sas_end_device_release() or sas_expander_release(). Function bsg_remove_queue() can handle a NULL pointer q, so remove the precheck in sas_rphy_remove(). " scsi: scsi_transport_sas: Fix memory leak when removing devices
2020-01-10 08:30:47 Ike Panhc tags ikeradar
2020-01-21 23:09:29 Seth Forshee linux (Ubuntu): status In Progress Fix Committed
2020-01-22 16:04:41 dann frazier kunpeng920/ubuntu-18.04-hwe: status In Progress Fix Committed
2020-01-22 16:04:44 dann frazier kunpeng920/ubuntu-20.04: status In Progress Fix Committed
2020-01-22 16:04:46 dann frazier kunpeng920: status In Progress Fix Committed
2020-01-27 15:10:42 dann frazier kunpeng920/upstream-kernel: status Fix Committed Fix Released
2020-03-16 23:19:02 Launchpad Janitor linux (Ubuntu): status Fix Committed Fix Released
2020-03-16 23:19:02 Launchpad Janitor cve linked 2019-19076
2020-04-24 10:51:53 Andrew Cloke kunpeng920/ubuntu-20.04: status Fix Committed Fix Released
2020-04-27 07:08:01 Ike Panhc kunpeng920/ubuntu-18.04-hwe: milestone ubuntu-18.04.5 ubuntu-18.04.4-sru-2
2020-04-27 07:08:06 Ike Panhc kunpeng920/ubuntu-18.04-hwe: status Fix Committed Fix Released
2020-04-27 07:08:10 Ike Panhc kunpeng920: status Fix Committed Fix Released