aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2005-09-12 22:01:35 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-09-20 13:32:45 -0400
commitbb052349798f775d4d7ed20ffcf1510287d8abe6 (patch)
tree18ff297cce52302382d196d988240db3837bcaeb /drivers
parentaf973481f4a0902ad35726636c290f4794704948 (diff)
[SCSI] iscsi: handle nonlinear skbs
From: zhenyu.z.wang@intel.com Fix oops from nonlinear skb usage. Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/iscsi_tcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index 8751f6015559..bb0a5039d334 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -1061,7 +1061,6 @@ iscsi_tcp_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb,
1061{ 1061{
1062 int rc; 1062 int rc;
1063 struct iscsi_conn *conn = rd_desc->arg.data; 1063 struct iscsi_conn *conn = rd_desc->arg.data;
1064 int start = skb_headlen(skb);
1065 int processed; 1064 int processed;
1066 char pad[ISCSI_PAD_LEN]; 1065 char pad[ISCSI_PAD_LEN];
1067 struct scatterlist sg; 1066 struct scatterlist sg;
@@ -1070,7 +1069,7 @@ iscsi_tcp_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb,
1070 * Save current SKB and its offset in the corresponding 1069 * Save current SKB and its offset in the corresponding
1071 * connection context. 1070 * connection context.
1072 */ 1071 */
1073 conn->in.copy = start - offset; 1072 conn->in.copy = skb->len - offset;
1074 conn->in.offset = offset; 1073 conn->in.offset = offset;
1075 conn->in.skb = skb; 1074 conn->in.skb = skb;
1076 conn->in.len = conn->in.copy; 1075 conn->in.len = conn->in.copy;