aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2005-09-12 21:01:35 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-09-20 12:32:45 -0500
commitbb052349798f775d4d7ed20ffcf1510287d8abe6 (patch)
tree18ff297cce52302382d196d988240db3837bcaeb /drivers/scsi
parentaf973481f4a0902ad35726636c290f4794704948 (diff)
downloadkernel_samsung_smdk4412-bb052349798f775d4d7ed20ffcf1510287d8abe6.tar.gz
kernel_samsung_smdk4412-bb052349798f775d4d7ed20ffcf1510287d8abe6.tar.bz2
kernel_samsung_smdk4412-bb052349798f775d4d7ed20ffcf1510287d8abe6.zip
[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/scsi')
-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 8751f601555..bb0a5039d33 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,
{
int rc;
struct iscsi_conn *conn = rd_desc->arg.data;
- int start = skb_headlen(skb);
int processed;
char pad[ISCSI_PAD_LEN];
struct scatterlist sg;
@@ -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
* connection context.
*/
- conn->in.copy = start - offset;
+ conn->in.copy = skb->len - offset;
conn->in.offset = offset;
conn->in.skb = skb;
conn->in.len = conn->in.copy;