Skip to content

Commit 3e9e01d

Browse files
author
Nicholas Bellinger
committed
target: Fix xop->dbl assignment in target_xcopy_parse_segdesc_02
This patch fixes up an incorrect assignment for xop->dbl within target_xcopy_parse_segdesc_02() code, as reported by Coverity here: http://marc.info/?l=linux-kernel&m=137936416618490&w=2 Reported-by: Dave Jones <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
1 parent 15c03dd commit 3e9e01d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/target/target_core_xcopy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ static int target_xcopy_parse_segdesc_02(struct se_cmd *se_cmd, struct xcopy_op
298298
(unsigned long long)xop->dst_lba);
299299

300300
if (dc != 0) {
301-
xop->dbl = (desc[29] << 16) & 0xff;
302-
xop->dbl |= (desc[30] << 8) & 0xff;
301+
xop->dbl = (desc[29] & 0xff) << 16;
302+
xop->dbl |= (desc[30] & 0xff) << 8;
303303
xop->dbl |= desc[31] & 0xff;
304304

305305
pr_debug("XCOPY seg desc 0x02: DC=1 w/ dbl: %u\n", xop->dbl);

0 commit comments

Comments
 (0)