commit fd9c40f64c514bdc585a21e2e33fa5f83ca8811b Author: Bart Van Assche <bvanass...@acm.org> Date: Thu Apr 4 10:08:43 2019 -0700
block: Revert v5.0 blk_mq_request_issue_directly() changes blk_mq_try_issue_directly() can return BLK_STS*_RESOURCE for requests that have been queued. If that happens when blk_mq_try_issue_directly() is called by the dm-mpath driver then dm-mpath will try to resubmit a request that is already queued and a kernel crash follows. Since it is nontrivial to fix blk_mq_request_issue_directly(), revert the blk_mq_request_issue_directly() changes that went into kernel v5.0. This patch reverts the following commits: * d6a51a97c0b2 ("blk-mq: replace and kill blk_mq_request_issue_directly") # v5.0. * 5b7a6f128aad ("blk-mq: issue directly with bypass 'false' in blk_mq_sched_insert_requests") # v5.0. * 7f556a44e61d ("blk-mq: refactor the code of issue request directly") # v5.0. Cc: Christoph Hellwig <h...@infradead.org> Cc: Ming Lei <ming....@redhat.com> Cc: Jianchao Wang <jianchao.w.w...@oracle.com> Cc: Hannes Reinecke <h...@suse.com> Cc: Johannes Thumshirn <jthumsh...@suse.de> Cc: James Smart <james.sm...@broadcom.com> Cc: Dongli Zhang <dongli.zh...@oracle.com> Cc: Laurence Oberman <lober...@redhat.com> Cc: <sta...@vger.kernel.org> Reported-by: Laurence Oberman <lober...@redhat.com> Tested-by: Laurence Oberman <lober...@redhat.com> Fixes: 7f556a44e61d ("blk-mq: refactor the code of issue request directly") # v5.0. Signed-off-by: Bart Van Assche <bvanass...@acm.org> Signed-off-by: Jens Axboe <ax...@kernel.dk> Patch exists in mainline from April 7 (patch landed April 4 but wasn't pulled into Mainline until April 7) so it's not currently in Disco or Eoan. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1827330 Title: [block layer] please pull below upstream patch to Ubuntu 19.04 kernel Status in linux package in Ubuntu: Confirmed Bug description: Doing a lip on lpfc crashes the Ubuntu 19.04 kernel #echo 1> /sys/class/fc_host/host<>/issue_lip Kernel version: Linux version 5.0.0-7-generic (buildd@lcy01-amd64-020) (gcc version 8.3.0 (Ubuntu 8.3.0-2ubuntu1)) Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.338980] BUG: unable to handle kernel NULL pointer dereference at 00000000000000b8 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.344517] #PF error: [normal kernel read fault] Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.344523] PGD 0 P4D 0 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.351436] device-mapper: multipath: Failing path 129:64. Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352960] RIP: 0010:blk_mq_dispatch_rq_list+0xc8/0x4f0 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352962] Code: 45 84 ed 0f 85 21 02 00 00 49 8b 06 83 45 ac 01 49 39 c6 0f 84 2e 02 00 00 4d 8b 3e 80 7d b0 00 4d 8d 67 b8 49 8b 5f c8 75 26 <48> 8b 83 b8 00 00 00 48 8b 40 40 48 8b 40 10 48 85 c0 74 12 48 89 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352963] RSP: 0018:ffffb8c6c7d37d88 EFLAGS: 00010246 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352965] RAX: ffff9da508c85848 RBX: 0000000000000000 RCX: 000000000000000a Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352966] RDX: 0000000000000000 RSI: ffffb8c6c7d37e10 RDI: ffff9da50321c848 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352967] RBP: ffffb8c6c7d37e00 R08: 0000000000000000 R09: 00646b636f6c626b Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352968] R10: 8080808080808080 R11: 000000ddf2c6455b R12: ffff9da508c85800 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352969] R13: 0000000000000000 R14: ffffb8c6c7d37e10 R15: ffff9da508c85848 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352971] FS: 0000000000000000(0000) GS:ffff9da51fdc0000(0000) knlGS:0000000000000000 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352972] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352973] CR2: 00000000000000b8 CR3: 00000007a8c0e002 CR4: 00000000007606e0 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352974] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352975] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.352976] PKRU: 55555554 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.353566] Oops: 0000 [#19] SMP PTI Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.403374] CPU: 2 PID: 27111 Comm: kworker/2:2H Tainted: G D 5.0.0-7-generic #8-Ubuntu Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.404046] Hardware name: Dell Inc. PowerEdge R740/07WCGN, BIOS 1.5.6 10/17/2018 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.404861] Workqueue: kblockd blk_mq_run_work_fn Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.405740] RIP: 0010:blk_mq_dispatch_rq_list+0xc8/0x4f0 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.406428] Code: 45 84 ed 0f 85 21 02 00 00 49 8b 06 83 45 ac 01 49 39 c6 0f 84 2e 02 00 00 4d 8b 3e 80 7d b0 00 4d 8d 67 b8 49 8b 5f c8 75 26 <48> 8b 83 b8 00 00 00 48 8b 40 40 48 8b 40 10 48 85 c0 74 12 48 89 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.407860] RSP: 0018:ffffb8c6ca4dfd88 EFLAGS: 00010246 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.408624] RAX: ffff9da509360b48 RBX: 0000000000000000 RCX: 000000000000000a Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.409492] RDX: 0000000000000000 RSI: ffffb8c6ca4dfe10 RDI: ffff9da50cc71010 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.410234] RBP: ffffb8c6ca4dfe00 R08: 0000000000000000 R09: 00646b636f6c626b Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.410980] R10: 8080808080808080 R11: 0000000000001000 R12: ffff9da509360b00 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.411730] R13: 0000000000000000 R14: ffffb8c6ca4dfe10 R15: ffff9da509360b48 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.412493] FS: 0000000000000000(0000) GS:ffff9da51fa40000(0000) knlGS:0000000000000000 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.413283] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.414045] CR2: 00000000000000b8 CR3: 00000007a8c0e006 CR4: 00000000007606e0 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.414814] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.415586] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.416366] PKRU: 55555554 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.417100] Call Trace: Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.417818] ? blk_mq_flush_busy_ctxs+0xf7/0x110 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.418522] blk_mq_sched_dispatch_requests+0x153/0x170 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.419211] __blk_mq_run_hw_queue+0x57/0xe0 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.419969] blk_mq_run_work_fn+0x1b/0x20 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.420642] process_one_work+0x20f/0x410 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.421421] worker_thread+0x34/0x400 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.422043] kthread+0x120/0x140 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.422653] ? process_one_work+0x410/0x410 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.423262] ? __kthread_parkme+0x70/0x70 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.423859] ret_from_fork+0x35/0x40 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.424522] Modules linked in: xt_tcpudp ip6table_filter ip6_tables iptable_filter bpfilter nls_iso8859_1 dm_service_time dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua intel_rapl skx_edac nfit x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel dcdbas kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel intel_cstate intel_rapl_perf ipmi_ssif input_leds joydev mei_me mei ipmi_si ipmi_devintf ipmi_msghandler acpi_power_meter mac_hid sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear ses enclosure scsi_transport_sas uas usb_storage hid_generic usbhid hid mgag200 i2c_algo_bit lpfc ttm drm_kms_helper syscopyarea nvmet_fc aesni_intel sysfillrect nvmet sysimgblt nvme_fc nvme_fabrics fb_sys_fops aes_x86_64 crypto_simd cryptd nvme_core glue_helper drm Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.424562] scsi_transport_fc ahci megaraid_sas lpc_ich tg3 libahci Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.430783] CR2: 00000000000000b8 Apr 8 12:10:38 dhcp-10-123-163-25 kernel: [ 8673.431477] ---[ end trace 2d2128512982fd5b ]--- Below patch should fix this issue: --------------------------------- From fd9c40f64c514bdc585a21e2e33fa5f83ca8811b Mon Sep 17 00:00:00 2001 From: Bart Van Assche <bvanass...@acm.org> Date: Thu, 4 Apr 2019 10:08:43 -0700 Subject: [PATCH] block: Revert v5.0 blk_mq_request_issue_directly() changes blk_mq_try_issue_directly() can return BLK_STS*_RESOURCE for requests that have been queued. If that happens when blk_mq_try_issue_directly() is called by the dm-mpath driver then dm-mpath will try to resubmit a request that is already queued and a kernel crash follows. Since it is nontrivial to fix blk_mq_request_issue_directly(), revert the blk_mq_request_issue_directly() changes that went into kernel v5.0. This patch reverts the following commits: * d6a51a97c0b2 ("blk-mq: replace and kill blk_mq_request_issue_directly") # v5.0. * 5b7a6f128aad ("blk-mq: issue directly with bypass 'false' in blk_mq_sched_insert_requests") # v5.0. * 7f556a44e61d ("blk-mq: refactor the code of issue request directly") # v5.0. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1827330/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp