Commit bb052349 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley

[SCSI] iscsi: handle nonlinear skbs

From: zhenyu.z.wang@intel.com

Fix oops from nonlinear skb usage.
Signed-off-by: default avatarAlex Aizman <itn780@yahoo.com>
Signed-off-by: default avatarDmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent af973481
...@@ -1061,7 +1061,6 @@ iscsi_tcp_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb, ...@@ -1061,7 +1061,6 @@ iscsi_tcp_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb,
{ {
int rc; int rc;
struct iscsi_conn *conn = rd_desc->arg.data; struct iscsi_conn *conn = rd_desc->arg.data;
int start = skb_headlen(skb);
int processed; int processed;
char pad[ISCSI_PAD_LEN]; char pad[ISCSI_PAD_LEN];
struct scatterlist sg; struct scatterlist sg;
...@@ -1070,7 +1069,7 @@ iscsi_tcp_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb, ...@@ -1070,7 +1069,7 @@ iscsi_tcp_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb,
* Save current SKB and its offset in the corresponding * Save current SKB and its offset in the corresponding
* connection context. * connection context.
*/ */
conn->in.copy = start - offset; conn->in.copy = skb->len - offset;
conn->in.offset = offset; conn->in.offset = offset;
conn->in.skb = skb; conn->in.skb = skb;
conn->in.len = conn->in.copy; conn->in.len = conn->in.copy;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment