Bart Van Assche
08965c2eba
Revert "sd: remove __data_len hack for WRITE SAME"
This patch reverts commit f80de881d8 and avoids that sending a
WRITE SAME command to the iSCSI initiator triggers the following:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000014
TARGET_CORE[iSCSI]: Expected Transfer Length: 260096 does not match SCSI CDB Length: 512 for SAM Opcode: 0x41
IP: iscsi_tcp_segment_done+0x20b/0x310 [libiscsi_tcp]
Oops: 0000 [#1] SMP
Modules linked in: target_core_user uio target_core_iblock target_core_file iscsi_target_mod target_core_mod netconsole configfs crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 crypto_simd cryptd glue_helper virtio_console virtio_rng virtio_balloon serio_raw i2c_piix4 acpi_cpufreq button iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ext4 jbd2 mbcache virtio_blk virtio_net psmouse floppy drm_kms_helper syscopyarea
sysfillrect sysimgblt fb_sys_fops ttm drm virtio_pci
CPU: 2 PID: 5 Comm: kworker/u8:0 Not tainted 4.10.0-rc5-debug+ #3
Workqueue: iscsi_q_0 iscsi_xmitworker [libiscsi]
RIP: 0010:iscsi_tcp_segment_done+0x20b/0x310 [libiscsi_tcp]
Call Trace:
iscsi_sw_tcp_xmit_segment+0x84/0x120 [iscsi_tcp]
iscsi_sw_tcp_pdu_xmit+0x51/0x180 [iscsi_tcp]
iscsi_tcp_task_xmit+0xb3/0x290 [libiscsi_tcp]
iscsi_xmit_task+0x4e/0xc0 [libiscsi]
iscsi_xmitworker+0x243/0x330 [libiscsi]
process_one_work+0x1d8/0x4b0
worker_thread+0x49/0x4a0
kthread+0x102/0x140
Fixes: f80de881d8 ("sd: remove __data_len hack for WRITE SAME")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Jens Axboe <axboe@fb.com>
Cc: Lee Duncan <lduncan@suse.com>
Cc: Chris Leech <cleech@redhat.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2017-01-26 10:01:20 -07:00
..
2016-12-24 11:46:01 -08:00
2016-12-14 10:54:27 +01:00
2016-11-29 11:21:49 -05:00
2016-12-24 11:46:01 -08:00
2016-12-14 10:49:33 -08:00
2017-01-17 17:32:54 -05:00
2016-12-25 10:47:42 +01:00
2016-12-25 10:47:43 +01:00
2016-12-14 15:11:53 -05:00
2016-11-30 19:53:02 -05:00
2016-12-14 10:49:33 -08:00
2017-01-05 20:41:31 -05:00
2016-12-07 18:55:58 -05:00
2016-12-08 17:04:25 -05:00
2017-01-17 09:42:29 -08:00
2016-12-01 08:36:17 -05:00
2016-12-14 10:49:33 -08:00
2017-01-17 14:14:32 -05:00
2016-12-24 11:46:01 -08:00
2017-01-17 14:36:57 -05:00
2016-12-14 10:49:33 -08:00
2016-12-26 20:32:48 -08:00
2017-01-20 14:17:04 -08:00
2016-12-07 18:58:58 -05:00
2017-01-05 20:45:42 -05:00
2016-12-25 17:21:22 +01:00
2016-12-24 11:46:01 -08:00
2016-12-14 15:25:12 -05:00
2016-12-24 11:46:01 -08:00
2016-12-14 15:25:12 -05:00
2016-12-24 11:46:01 -08:00
2016-12-14 15:25:12 -05:00
2016-12-24 11:46:01 -08:00
2016-12-08 16:58:22 -05:00
2016-12-08 16:57:21 -05:00
2016-12-24 11:46:01 -08:00
2016-12-14 15:33:13 -05:00
2016-12-14 10:49:33 -08:00
2016-12-24 11:46:01 -08:00
2016-11-30 19:58:04 -05:00
2016-12-24 11:46:01 -08:00
2016-12-14 14:56:28 -05:00
2016-12-14 14:56:28 -05:00
2016-12-24 11:46:01 -08:00
2016-12-08 16:57:21 -05:00
2016-12-08 16:57:21 -05:00
2016-12-24 11:46:01 -08:00
2016-12-14 10:49:33 -08:00
2016-11-28 15:51:31 -05:00
2016-12-25 17:21:22 +01:00
2016-12-07 18:13:52 -05:00
2016-12-24 11:46:01 -08:00
2017-01-14 17:07:04 -08:00
2016-12-24 11:46:01 -08:00
2016-12-14 15:51:17 -05:00
2016-11-29 11:21:27 -05:00
2017-01-26 10:01:20 -07:00
2017-01-17 13:58:57 -05:00
2016-12-22 23:03:42 -05:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-11-30 11:38:24 -05:00
2016-12-09 10:59:13 +01:00