[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#683735: marked as done (linux-image-3.2.0-3-686-pae: kernel ops when delete connected target)



Your message dated Sat, 24 Apr 2021 06:54:20 -0700 (PDT)
with message-id <6084230c.1c69fb81.7b02c.7f4f@mx.google.com>
and subject line Closing this bug (BTS maintenance for src:linux bugs)
has caused the Debian Bug report #683735,
regarding linux-image-3.2.0-3-686-pae: kernel ops when delete connected target
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
683735: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683735
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: src
Version: 3.2.21-3
Severity: normal

Dear Maintainer,
Steps to reproduce:
1. I've loaded modules
 # modprobe target_core_mod iscsi_target_mod

2. I've created iscsi target:
 # mkdir -p /sys/kernel/config/target/core/iblock_1/_disk
 # cd /sys/kernel/config/target/core/iblock_1/_disk
 # echo "udev_path=<block device_for_share>" >control
 # echo "<block device_for_share>" >udev_path
 # echo "1" >enable

 # mkdir -p
/sys/kernel/config/target/iscsi/iqn.2000-01.com.example\:tst.a/tpgt_0/
 # cd /sys/kernel/config/target/iscsi/iqn.2000-01.com.example\:tst.a/tpgt_0/
 # mkdir lun/lun_0
 # ln -s /sys/kernel/config/target/core/iblock_1/_disk lun/lun_0/_disk
 # mkdir np/<your ip>:3260
 # echo "0" > attrib/authentication
 # echo "0" > attrib/demo_mode_write_protect
 # echo "1" > attrib/generate_node_acls
 # echo "1" > attrib/cache_dynamic_acls
 # echo "1" > enable

3. connect to this target using any iSCSI initialor (I've used Windows7,
but it's unimportant), mount and format lun
4. With no disconnecting, delete target
 # cd /sys/kernel/config/target/iscsi/iqn.2000-01.com.example\:tst.a/tpgt_0/
 # rmdir lun/lun_0/_disk  # rmdir lun/lun_0  # rmdir np/*  # cd
/sys/kernel/config/target/iscsi/
 # rmdir iqn.2000-01.com.example\:tst.a/tpgt_0/
 # rmdir iqn.2000-01.com.example\:tst.a

You will get kernel oops with big probability:
Modules linked in: crc32c target_core_pscsi target_core_file
target_core_iblock iscsi_target_mod linear raid1 md_mod target_core_mod
configfs ib_iser rdma_cm ib_addr iw_cm ib_cm ib_sa ib_mad ib_core
iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi nfsd nfs nfs_acl
auth_rpcgss fscache lockd sunrpc loop snd_intel8x0 snd_ac97_codec
snd_pcm snd_page_alloc snd_timer parport_pc ac97_bus i2c_piix4 i2c_core
snd soundcore parport joydev processor button ac power_supply psmouse
serio_raw pcspkr evdev thermal_sys ext4 crc16 jbd2 mbcache dm_mod usbhid
hid sd_mod crc_t10dif ata_generic ahci libahci ohci_hcd ehci_hcd usbcore
ata_piix libata usb_common e1000 scsi_mod [last unloaded: scsi_wait_scan]

Pid: 26165, comm: iscsi_trx Not tainted 3.2.0-3-686-pae #1 innotek GmbH
VirtualBox
EIP: 0060:[<f8604390>] EFLAGS: 00010246 CPU: 0
EIP is at transport_free_dev_tasks+0xb0/0xc3 [target_core_mod]
EAX: f57473c0 EBX: e4d02200 ECX: e4d3dec8 EDX: 00000000
ESI: f57473ec EDI: e4d3dec8 EBP: f57473c0 ESP: e4d3dec0
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
 e4d02308 e4d02364 e4d3dec8 e4d3dec8 e4d02200 f720d600 e4d02040 f7207a04
 f86053b3 f7207800 f89cabc6 f72078a4 f7207a28 f720d600 08000246 e4d02400
 00000000 e4d3dfac f7207800 f89ca6ac f5cb59c0 e4d3df7c 00000000 00001000
 [<f86053b3>] ? transport_generic_free_cmd+0x4a/0x52 [target_core_mod]
 [<f89cabc6>] ? iscsit_close_connection+0xf8/0x463 [iscsi_target_mod]
 [<f89ca6ac>] ? iscsi_target_rx_thread+0x1aed/0x1b2e [iscsi_target_mod]
 [<c12be868>] ? __schedule+0x54b/0x55b
 [<c101e947>] ? __default_send_IPI_dest_field+0x2f/0x4c
 [<c101eb6d>] ? default_send_IPI_mask_logical+0x65/0x73
 [<f89c8bbf>] ? iscsit_thread_get_cpumask+0x64/0x64 [iscsi_target_mod]
 [<c104cca7>] ? kthread+0x63/0x68
 [<c104cc44>] ? kthread_worker_fn+0x101/0x101
 [<c12c463e>] ? kernel_thread_helper+0x6/0x10
---[ end trace 1780e9d6992052e8 ]---

Patch for fix this problem in attachment

-- 
Thanks,
Aliaksandr Barouski

--- a/drivers/target/target_core_transport.c	2012-06-19 23:18:30.000000000 +0100
+++ b/drivers/target/target_core_transport.c	2012-08-03 11:01:30.221732735 +0100
@@ -3312,7 +3312,8 @@
 
 		list_del(&task->t_list);
 
-		cmd->se_dev->transport->free_task(task);
+		if (cmd->se_dev->transport)
+			cmd->se_dev->transport->free_task(task);
 	}
 }
 
@@ -3690,7 +3691,8 @@
 		task->task_sg = kmalloc(sizeof(struct scatterlist) *
 					task_sg_nents_padded, GFP_KERNEL);
 		if (!task->task_sg) {
-			cmd->se_dev->transport->free_task(task);
+			if(cmd->se_dev->transport)
+				cmd->se_dev->transport->free_task(task);
 			return -ENOMEM;
 		}
 


--- End Message ---
--- Begin Message ---
Hi

This bug was filed for a very old kernel or the bug is old itself
without resolution.

If you can reproduce it with

- the current version in unstable/testing
- the latest kernel from backports

please reopen the bug, see https://www.debian.org/Bugs/server-control
for details.

Regards,
Salvatore

--- End Message ---

Reply to: