From: Nicholas Bellinger Date: Tue, 3 May 2011 21:23:54 +0000 (-0700) Subject: target: Fix WRITE_SAME_16 t_task_lba assignment bug X-Git-Tag: firefly_0821_release~3680^2~4997^2~30 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1eb437a4ac1813f21424b8c9c39575fd61528a26;p=firefly-linux-kernel-4.4.55.git target: Fix WRITE_SAME_16 t_task_lba assignment bug This patch fixes a bug in the assignment of cmd->t_task.t_task_lba with WRITE_SAME_16 to correctly use get_unaligned_be64() for the 64-bit LBA. Reported-by: Chris Greiveldinger Signed-off-by: Nicholas A. Bellinger --- diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index d0cd6016d3b5..a29f6d3fc55b 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3417,7 +3417,7 @@ static int transport_generic_cmd_sequencer( if (sector_ret) goto out_unsupported_cdb; size = transport_get_size(sectors, cdb, cmd); - cmd->t_task.t_task_lba = get_unaligned_be16(&cdb[2]); + cmd->t_task.t_task_lba = get_unaligned_be64(&cdb[2]); passthrough = (dev->transport->transport_type == TRANSPORT_PLUGIN_PHBA_PDEV); /*