Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53626
b: refs/heads/master
c: 8eb0053
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Mar 11, 2007
1 parent ea6a3a9 commit dc30f3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41be14442213b6dbeea3cba2ed18a2923666278c
refs/heads/master: 8eb00539d92187ade7e4cc24a1a36ab248ee8639
5 changes: 3 additions & 2 deletions trunk/drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/mutex.h>
#include <linux/kfifo.h>
#include <linux/delay.h>
#include <asm/unaligned.h>
#include <net/tcp.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
Expand Down Expand Up @@ -269,14 +270,14 @@ static int iscsi_scsi_cmd_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
goto out;
}

senselen = be16_to_cpu(*(__be16 *)data);
senselen = be16_to_cpu(get_unaligned((__be16 *) data));
if (datalen < senselen)
goto invalid_datalen;

memcpy(sc->sense_buffer, data + 2,
min_t(uint16_t, senselen, SCSI_SENSE_BUFFERSIZE));
debug_scsi("copied %d bytes of sense\n",
min(senselen, SCSI_SENSE_BUFFERSIZE));
min_t(uint16_t, senselen, SCSI_SENSE_BUFFERSIZE));
}

if (sc->sc_data_direction == DMA_TO_DEVICE)
Expand Down

0 comments on commit dc30f3f

Please sign in to comment.