Re: [PATCH] iscsi-target: fix panic when add the second TCP connection to iSCSI session
Hi Feng, As per my previous comment: >> Thanks for the patch Feng, I have tested this patch and below panic has also >> disappeared. patch applied successfully and the panic has disappeared, so your fix works. Regards, Sumit Rai > On Jul 18, 2016, at 7:49 AM, Feng Li <lifeng1...@gmail.com> wrote: > > Hi Sumit, > > I have tested and the oops is disappeared. > > Could you double check if you have patched successfully? > This stack is still the same. > > The place is 0x01f8. > > gdb> p (int)&((struct iscsi_session*)0)->se_sess > $3 = 0x1f8 > > 2016-07-14 17:59 GMT+08:00 Sumit Rai <sumit@calsoftinc.com>: >> Thanks for the patch Feng, I have tested this patch and below panic has also >> disappeared. >> (initially reported at >> http://article.gmane.org/gmane.linux.scsi.target.devel/12735). >> >> dmesg >> = >> [ 862.784477] BUG: unable to handle kernel NULL pointer dereference at >> 01f8 >> [ 862.784486] IP: [] >> iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] >> [ 862.784570] PGD 0 >> [ 862.784572] Oops: [#1] SMP >> [ 862.784575] Modules linked in: target_core_user uio tcm_fc libfc ib_srpt >> tcm_usb_gadget >> libcomposite udc_core tcm_loop vhost_scsi vhost iscsi_target_mod tcm_qla2xxx >> qla2xxx >> scsi_transport_fc target_core_file target_core_iblock target_core_pscsi >> target_core_mod >> configfs pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) >> vmw_vsock_vmci_transport vsock vmhgfs(OE) coretemp kvm_intel kvm binfmt_misc >> irqbypass >> crct10dif_pclmul crc32_pclmul aesni_intel vmw_balloon aes_x86_64 lrw >> gf128mul glue_helper >> ablk_helper cryptd joydev input_leds serio_raw i2c_piix4 vmw_vmci shpchp >> 8250_fintek mac_hid >> ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp >> libiscsi_tcp libiscsi >> scsi_transport_iscsi parport_pc ppdev lp parport autofs4 hid_generic usbhid >> hid vmwgfx ttm psmouse >> drm_kms_helper syscopyarea >> [ 862.784609] sysfillrect sysimgblt mptspi mptscsih fb_sys_fops drm ahci >> libahci e1000 mptbase >> scsi_transport_spi pata_acpi floppy fjes >> [ 862.784618] CPU: 0 PID: 9241 Comm: iscsi_np Tainted: G OE >> 4.4.0-24-generic #43-Ubuntu >> [ 862.784620] Hardware name: VMware, Inc. VMware Virtual Platform/440BX >> Desktop Reference Platform, >> BIOS 6.00 05/20/2014 >> [ 862.784622] task: 8800759d1b80 ti: 880075a0 task.ti: >> 880075a0 >> [ 862.784624] RIP: 0010:[] [] >> iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] >> [ 862.784632] RSP: 0018:880075a03e40 EFLAGS: 00010246 >> [ 862.784633] RAX: RBX: 880075a52800 RCX: >> 00037726 >> [ 862.784635] RDX: 00037725 RSI: 88007b619fe0 RDI: >> 880033bce800 >> [ 862.784636] RBP: 880075a03ec0 R08: 00019fe0 R09: >> c06067c6 >> [ 862.784637] R10: ea0001d1d880 R11: 654d687475410032 R12: >> 880074763140 >> [ 862.784638] R13: 880075a52820 R14: 880075a528d8 R15: >> 880033bce800 >> [ 862.784640] FS: () GS:88007b60() >> knlGS: >> [ 862.784641] CS: 0010 DS: ES: CR0: 8005003b >> [ 862.784642] CR2: 01f8 CR3: 72f8e000 CR4: >> 000406f0 >> [ 862.784716] Stack: >> [ 862.784719] 880075e87080 88003526f358 8800799cc420 >> 8800 >> [ 862.784721] 880079cd0100 880075a52828 00ff88003526ee00 >> 880075a528d8 >> [ 862.784723] 8800759d1b80 880075a52800 58f0fa77 >> 880075a0aac0 >> [ 862.784725] Call Trace: >> [ 862.784736] [] ? >> iscsi_target_login_sess_out+0x240/0x240 [iscsi_target_mod] >> [ 862.784782] [] kthread+0xd8/0xf0 >> [ 862.784786] [] ? kthread_create_on_node+0x1e0/0x1e0 >> [ 862.784789] [] ret_from_fork+0x3f/0x70 >> [ 862.784791] [] ? kthread_create_on_node+0x1e0/0x1e0 >> [ 862.784792] Code: 00 00 4c 89 e2 4c 89 fe 48 89 df e8 c7 19 00 00 85 c0 >> 0f 88 32 01 00 00 0f b6 45 b7 4c 89 ff 41 88 44 24 09 >> 49 8b 87 48 05 00 00 <4c> 8b b0 f8 01 00 00 49 8b 87 10 05 00 00 ff 90 98 00 >> 00 00 41 >> [ 862.784811] RIP [] >> iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] >> [ 862.784819] RSP >> [ 862.784820] CR2: 01f8 >> [ 862.784823] ---[ end trace 7e41630f165c8027 ]--- >> >> Regards, >> Sumit Rai
Re: [PATCH] iscsi-target: fix panic when add the second TCP connection to iSCSI session
Hi Feng, As per my previous comment: >> Thanks for the patch Feng, I have tested this patch and below panic has also >> disappeared. patch applied successfully and the panic has disappeared, so your fix works. Regards, Sumit Rai > On Jul 18, 2016, at 7:49 AM, Feng Li wrote: > > Hi Sumit, > > I have tested and the oops is disappeared. > > Could you double check if you have patched successfully? > This stack is still the same. > > The place is 0x01f8. > > gdb> p (int)&((struct iscsi_session*)0)->se_sess > $3 = 0x1f8 > > 2016-07-14 17:59 GMT+08:00 Sumit Rai : >> Thanks for the patch Feng, I have tested this patch and below panic has also >> disappeared. >> (initially reported at >> http://article.gmane.org/gmane.linux.scsi.target.devel/12735). >> >> dmesg >> = >> [ 862.784477] BUG: unable to handle kernel NULL pointer dereference at >> 01f8 >> [ 862.784486] IP: [] >> iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] >> [ 862.784570] PGD 0 >> [ 862.784572] Oops: [#1] SMP >> [ 862.784575] Modules linked in: target_core_user uio tcm_fc libfc ib_srpt >> tcm_usb_gadget >> libcomposite udc_core tcm_loop vhost_scsi vhost iscsi_target_mod tcm_qla2xxx >> qla2xxx >> scsi_transport_fc target_core_file target_core_iblock target_core_pscsi >> target_core_mod >> configfs pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) >> vmw_vsock_vmci_transport vsock vmhgfs(OE) coretemp kvm_intel kvm binfmt_misc >> irqbypass >> crct10dif_pclmul crc32_pclmul aesni_intel vmw_balloon aes_x86_64 lrw >> gf128mul glue_helper >> ablk_helper cryptd joydev input_leds serio_raw i2c_piix4 vmw_vmci shpchp >> 8250_fintek mac_hid >> ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp >> libiscsi_tcp libiscsi >> scsi_transport_iscsi parport_pc ppdev lp parport autofs4 hid_generic usbhid >> hid vmwgfx ttm psmouse >> drm_kms_helper syscopyarea >> [ 862.784609] sysfillrect sysimgblt mptspi mptscsih fb_sys_fops drm ahci >> libahci e1000 mptbase >> scsi_transport_spi pata_acpi floppy fjes >> [ 862.784618] CPU: 0 PID: 9241 Comm: iscsi_np Tainted: G OE >> 4.4.0-24-generic #43-Ubuntu >> [ 862.784620] Hardware name: VMware, Inc. VMware Virtual Platform/440BX >> Desktop Reference Platform, >> BIOS 6.00 05/20/2014 >> [ 862.784622] task: 8800759d1b80 ti: 880075a0 task.ti: >> 880075a0 >> [ 862.784624] RIP: 0010:[] [] >> iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] >> [ 862.784632] RSP: 0018:880075a03e40 EFLAGS: 00010246 >> [ 862.784633] RAX: RBX: 880075a52800 RCX: >> 00037726 >> [ 862.784635] RDX: 00037725 RSI: 88007b619fe0 RDI: >> 880033bce800 >> [ 862.784636] RBP: 880075a03ec0 R08: 00019fe0 R09: >> c06067c6 >> [ 862.784637] R10: ea0001d1d880 R11: 654d687475410032 R12: >> 880074763140 >> [ 862.784638] R13: 880075a52820 R14: 880075a528d8 R15: >> 880033bce800 >> [ 862.784640] FS: () GS:88007b60() >> knlGS: >> [ 862.784641] CS: 0010 DS: ES: CR0: 8005003b >> [ 862.784642] CR2: 01f8 CR3: 72f8e000 CR4: >> 000406f0 >> [ 862.784716] Stack: >> [ 862.784719] 880075e87080 88003526f358 8800799cc420 >> 8800 >> [ 862.784721] 880079cd0100 880075a52828 00ff88003526ee00 >> 880075a528d8 >> [ 862.784723] 8800759d1b80 880075a52800 58f0fa77 >> 880075a0aac0 >> [ 862.784725] Call Trace: >> [ 862.784736] [] ? >> iscsi_target_login_sess_out+0x240/0x240 [iscsi_target_mod] >> [ 862.784782] [] kthread+0xd8/0xf0 >> [ 862.784786] [] ? kthread_create_on_node+0x1e0/0x1e0 >> [ 862.784789] [] ret_from_fork+0x3f/0x70 >> [ 862.784791] [] ? kthread_create_on_node+0x1e0/0x1e0 >> [ 862.784792] Code: 00 00 4c 89 e2 4c 89 fe 48 89 df e8 c7 19 00 00 85 c0 >> 0f 88 32 01 00 00 0f b6 45 b7 4c 89 ff 41 88 44 24 09 >> 49 8b 87 48 05 00 00 <4c> 8b b0 f8 01 00 00 49 8b 87 10 05 00 00 ff 90 98 00 >> 00 00 41 >> [ 862.784811] RIP [] >> iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] >> [ 862.784819] RSP >> [ 862.784820] CR2: 01f8 >> [ 862.784823] ---[ end trace 7e41630f165c8027 ]--- >> >> Regards, >> Sumit Rai >>> On Jul 12, 2016, at 8:46 AM, Feng Li wrote:
Re: [PATCH] iscsi-target: fix panic when add the second TCP connection to iSCSI session
Thanks for the patch Feng, I have tested this patch and below panic has also disappeared. (initially reported at http://article.gmane.org/gmane.linux.scsi.target.devel/12735). dmesg = [ 862.784477] BUG: unable to handle kernel NULL pointer dereference at 01f8 [ 862.784486] IP: [] iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] [ 862.784570] PGD 0 [ 862.784572] Oops: [#1] SMP [ 862.784575] Modules linked in: target_core_user uio tcm_fc libfc ib_srpt tcm_usb_gadget libcomposite udc_core tcm_loop vhost_scsi vhost iscsi_target_mod tcm_qla2xxx qla2xxx scsi_transport_fc target_core_file target_core_iblock target_core_pscsi target_core_mod configfs pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) vmw_vsock_vmci_transport vsock vmhgfs(OE) coretemp kvm_intel kvm binfmt_misc irqbypass crct10dif_pclmul crc32_pclmul aesni_intel vmw_balloon aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd joydev input_leds serio_raw i2c_piix4 vmw_vmci shpchp 8250_fintek mac_hid ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi parport_pc ppdev lp parport autofs4 hid_generic usbhid hid vmwgfx ttm psmouse drm_kms_helper syscopyarea [ 862.784609] sysfillrect sysimgblt mptspi mptscsih fb_sys_fops drm ahci libahci e1000 mptbase scsi_transport_spi pata_acpi floppy fjes [ 862.784618] CPU: 0 PID: 9241 Comm: iscsi_np Tainted: G OE 4.4.0-24-generic #43-Ubuntu [ 862.784620] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/20/2014 [ 862.784622] task: 8800759d1b80 ti: 880075a0 task.ti: 880075a0 [ 862.784624] RIP: 0010:[] [] iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] [ 862.784632] RSP: 0018:880075a03e40 EFLAGS: 00010246 [ 862.784633] RAX: RBX: 880075a52800 RCX: 00037726 [ 862.784635] RDX: 00037725 RSI: 88007b619fe0 RDI: 880033bce800 [ 862.784636] RBP: 880075a03ec0 R08: 00019fe0 R09: c06067c6 [ 862.784637] R10: ea0001d1d880 R11: 654d687475410032 R12: 880074763140 [ 862.784638] R13: 880075a52820 R14: 880075a528d8 R15: 880033bce800 [ 862.784640] FS: () GS:88007b60() knlGS: [ 862.784641] CS: 0010 DS: ES: CR0: 8005003b [ 862.784642] CR2: 01f8 CR3: 72f8e000 CR4: 000406f0 [ 862.784716] Stack: [ 862.784719] 880075e87080 88003526f358 8800799cc420 8800 [ 862.784721] 880079cd0100 880075a52828 00ff88003526ee00 880075a528d8 [ 862.784723] 8800759d1b80 880075a52800 58f0fa77 880075a0aac0 [ 862.784725] Call Trace: [ 862.784736] [] ? iscsi_target_login_sess_out+0x240/0x240 [iscsi_target_mod] [ 862.784782] [] kthread+0xd8/0xf0 [ 862.784786] [] ? kthread_create_on_node+0x1e0/0x1e0 [ 862.784789] [] ret_from_fork+0x3f/0x70 [ 862.784791] [] ? kthread_create_on_node+0x1e0/0x1e0 [ 862.784792] Code: 00 00 4c 89 e2 4c 89 fe 48 89 df e8 c7 19 00 00 85 c0 0f 88 32 01 00 00 0f b6 45 b7 4c 89 ff 41 88 44 24 09 49 8b 87 48 05 00 00 <4c> 8b b0 f8 01 00 00 49 8b 87 10 05 00 00 ff 90 98 00 00 00 41 [ 862.784811] RIP [] iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] [ 862.784819] RSP [ 862.784820] CR2: 01f8 [ 862.784823] ---[ end trace 7e41630f165c8027 ]--- Regards, Sumit Rai > On Jul 12, 2016, at 8:46 AM, Feng Li <lifeng1...@gmail.com> wrote: > > Add ls...@suse.com > > 2016-07-11 22:23 GMT+08:00 冯力 <lifeng1...@gmail.com>: >> This problem exists at least from v3.16. >> The upstream kernel still exists this issue. >> >> I have tested my patch and the following panic is disappeared. >> >> Thanks, >> - Alex >> >> #dmesg >> >> [ 1160.788676] sd 16:0:0:0: [sde] Attached SCSI disk >> [ 1383.962626] target_core_get_fabric() failed for usb_gadget >> [ 1404.788910] TARGET_CORE[iSCSI]: Unsupported SCSI Opcode 0x1b, >> sending CHECK_CONDITION. >> [ 1404.858451] BUG: unable to handle kernel NULL pointer dereference >> at 01f8 >> [ 1404.858911] IP: [] >> iscsi_target_login_thread+0x728/0x10b0 [iscsi_target_mod] >> [ 1404.859746] PGD 230c29067 PUD 232060067 PMD 0 >> [ 1404.859963] Oops: [#1] SMP >> [ 1404.860154] Modules linked in: crc32c_generic tcm_loop tcm_qla2xxx >> qla2xxx iscsi_target_mod ib_srpt vhost_scsi vhost tcm_fc libfc >> scsi_transport_fc scsi_tgt target_core_file target_core_iblock >> target_core_pscsi target_core_mod configfs nbd >> vmw_vsock_vmci_transport vsock bridge stp llc vmhgfs(O) snd_ens1371 >> snd_rawmidi snd_seq_device snd_ac97_codec snd_pcm snd_timer snd >> vmw_balloon evdev soundcore ac97_bus gameport ppdev pcspkr sg ps
Re: [PATCH] iscsi-target: fix panic when add the second TCP connection to iSCSI session
Thanks for the patch Feng, I have tested this patch and below panic has also disappeared. (initially reported at http://article.gmane.org/gmane.linux.scsi.target.devel/12735). dmesg = [ 862.784477] BUG: unable to handle kernel NULL pointer dereference at 01f8 [ 862.784486] IP: [] iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] [ 862.784570] PGD 0 [ 862.784572] Oops: [#1] SMP [ 862.784575] Modules linked in: target_core_user uio tcm_fc libfc ib_srpt tcm_usb_gadget libcomposite udc_core tcm_loop vhost_scsi vhost iscsi_target_mod tcm_qla2xxx qla2xxx scsi_transport_fc target_core_file target_core_iblock target_core_pscsi target_core_mod configfs pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) vmw_vsock_vmci_transport vsock vmhgfs(OE) coretemp kvm_intel kvm binfmt_misc irqbypass crct10dif_pclmul crc32_pclmul aesni_intel vmw_balloon aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd joydev input_leds serio_raw i2c_piix4 vmw_vmci shpchp 8250_fintek mac_hid ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi parport_pc ppdev lp parport autofs4 hid_generic usbhid hid vmwgfx ttm psmouse drm_kms_helper syscopyarea [ 862.784609] sysfillrect sysimgblt mptspi mptscsih fb_sys_fops drm ahci libahci e1000 mptbase scsi_transport_spi pata_acpi floppy fjes [ 862.784618] CPU: 0 PID: 9241 Comm: iscsi_np Tainted: G OE 4.4.0-24-generic #43-Ubuntu [ 862.784620] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/20/2014 [ 862.784622] task: 8800759d1b80 ti: 880075a0 task.ti: 880075a0 [ 862.784624] RIP: 0010:[] [] iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] [ 862.784632] RSP: 0018:880075a03e40 EFLAGS: 00010246 [ 862.784633] RAX: RBX: 880075a52800 RCX: 00037726 [ 862.784635] RDX: 00037725 RSI: 88007b619fe0 RDI: 880033bce800 [ 862.784636] RBP: 880075a03ec0 R08: 00019fe0 R09: c06067c6 [ 862.784637] R10: ea0001d1d880 R11: 654d687475410032 R12: 880074763140 [ 862.784638] R13: 880075a52820 R14: 880075a528d8 R15: 880033bce800 [ 862.784640] FS: () GS:88007b60() knlGS: [ 862.784641] CS: 0010 DS: ES: CR0: 8005003b [ 862.784642] CR2: 01f8 CR3: 72f8e000 CR4: 000406f0 [ 862.784716] Stack: [ 862.784719] 880075e87080 88003526f358 8800799cc420 8800 [ 862.784721] 880079cd0100 880075a52828 00ff88003526ee00 880075a528d8 [ 862.784723] 8800759d1b80 880075a52800 58f0fa77 880075a0aac0 [ 862.784725] Call Trace: [ 862.784736] [] ? iscsi_target_login_sess_out+0x240/0x240 [iscsi_target_mod] [ 862.784782] [] kthread+0xd8/0xf0 [ 862.784786] [] ? kthread_create_on_node+0x1e0/0x1e0 [ 862.784789] [] ret_from_fork+0x3f/0x70 [ 862.784791] [] ? kthread_create_on_node+0x1e0/0x1e0 [ 862.784792] Code: 00 00 4c 89 e2 4c 89 fe 48 89 df e8 c7 19 00 00 85 c0 0f 88 32 01 00 00 0f b6 45 b7 4c 89 ff 41 88 44 24 09 49 8b 87 48 05 00 00 <4c> 8b b0 f8 01 00 00 49 8b 87 10 05 00 00 ff 90 98 00 00 00 41 [ 862.784811] RIP [] iscsi_target_login_thread+0x724/0xfa0 [iscsi_target_mod] [ 862.784819] RSP [ 862.784820] CR2: 01f8 [ 862.784823] ---[ end trace 7e41630f165c8027 ]--- Regards, Sumit Rai > On Jul 12, 2016, at 8:46 AM, Feng Li wrote: > > Add ls...@suse.com > > 2016-07-11 22:23 GMT+08:00 冯力 : >> This problem exists at least from v3.16. >> The upstream kernel still exists this issue. >> >> I have tested my patch and the following panic is disappeared. >> >> Thanks, >> - Alex >> >> #dmesg >> >> [ 1160.788676] sd 16:0:0:0: [sde] Attached SCSI disk >> [ 1383.962626] target_core_get_fabric() failed for usb_gadget >> [ 1404.788910] TARGET_CORE[iSCSI]: Unsupported SCSI Opcode 0x1b, >> sending CHECK_CONDITION. >> [ 1404.858451] BUG: unable to handle kernel NULL pointer dereference >> at 01f8 >> [ 1404.858911] IP: [] >> iscsi_target_login_thread+0x728/0x10b0 [iscsi_target_mod] >> [ 1404.859746] PGD 230c29067 PUD 232060067 PMD 0 >> [ 1404.859963] Oops: [#1] SMP >> [ 1404.860154] Modules linked in: crc32c_generic tcm_loop tcm_qla2xxx >> qla2xxx iscsi_target_mod ib_srpt vhost_scsi vhost tcm_fc libfc >> scsi_transport_fc scsi_tgt target_core_file target_core_iblock >> target_core_pscsi target_core_mod configfs nbd >> vmw_vsock_vmci_transport vsock bridge stp llc vmhgfs(O) snd_ens1371 >> snd_rawmidi snd_seq_device snd_ac97_codec snd_pcm snd_timer snd >> vmw_balloon evdev soundcore ac97_bus gameport ppdev pcspkr sg psmouse >> serio_raw parport_pc vmwgfx parport bat