Skip to content

Commit

Permalink
target: Fix xop->dbl assignment in target_xcopy_parse_segdesc_02
Browse files Browse the repository at this point in the history
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 <davej@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Nicholas Bellinger committed Oct 2, 2013
1 parent 15c03dd commit 3e9e01d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/target/target_core_xcopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ static int target_xcopy_parse_segdesc_02(struct se_cmd *se_cmd, struct xcopy_op
(unsigned long long)xop->dst_lba);

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

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

0 comments on commit 3e9e01d

Please sign in to comment.