diff options
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 396c79d8569c..3ab8abca29c3 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
@@ -1857,7 +1857,7 @@ static int iscsit_handle_text_cmd( | |||
1857 | char *text_ptr, *text_in; | 1857 | char *text_ptr, *text_in; |
1858 | int cmdsn_ret, niov = 0, rx_got, rx_size; | 1858 | int cmdsn_ret, niov = 0, rx_got, rx_size; |
1859 | u32 checksum = 0, data_crc = 0, payload_length; | 1859 | u32 checksum = 0, data_crc = 0, payload_length; |
1860 | u32 padding = 0, text_length = 0; | 1860 | u32 padding = 0, pad_bytes = 0, text_length = 0; |
1861 | struct iscsi_cmd *cmd; | 1861 | struct iscsi_cmd *cmd; |
1862 | struct kvec iov[3]; | 1862 | struct kvec iov[3]; |
1863 | struct iscsi_text *hdr; | 1863 | struct iscsi_text *hdr; |
@@ -1896,7 +1896,7 @@ static int iscsit_handle_text_cmd( | |||
1896 | 1896 | ||
1897 | padding = ((-payload_length) & 3); | 1897 | padding = ((-payload_length) & 3); |
1898 | if (padding != 0) { | 1898 | if (padding != 0) { |
1899 | iov[niov].iov_base = cmd->pad_bytes; | 1899 | iov[niov].iov_base = &pad_bytes; |
1900 | iov[niov++].iov_len = padding; | 1900 | iov[niov++].iov_len = padding; |
1901 | rx_size += padding; | 1901 | rx_size += padding; |
1902 | pr_debug("Receiving %u additional bytes" | 1902 | pr_debug("Receiving %u additional bytes" |
@@ -1917,7 +1917,7 @@ static int iscsit_handle_text_cmd( | |||
1917 | if (conn->conn_ops->DataDigest) { | 1917 | if (conn->conn_ops->DataDigest) { |
1918 | iscsit_do_crypto_hash_buf(&conn->conn_rx_hash, | 1918 | iscsit_do_crypto_hash_buf(&conn->conn_rx_hash, |
1919 | text_in, text_length, | 1919 | text_in, text_length, |
1920 | padding, cmd->pad_bytes, | 1920 | padding, (u8 *)&pad_bytes, |
1921 | (u8 *)&data_crc); | 1921 | (u8 *)&data_crc); |
1922 | 1922 | ||
1923 | if (checksum != data_crc) { | 1923 | if (checksum != data_crc) { |