diff options
author | Karen Xie <kxie@chelsio.com> | 2009-01-10 22:06:07 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-01-13 11:41:34 -0500 |
commit | 2856830bd395fbc2f0c5327effe71fb025dd262d (patch) | |
tree | 213afd49b7705e653f6273db1183befde67068ed /drivers/scsi/libiscsi_tcp.c | |
parent | 2f4c782c2e06fbaef2ac2b6b7abd796b96abd98b (diff) |
[SCSI] iscsi_tcp: make padbuf non-static
virt_to_page() call should not be used on kernel text and data
addresses. virt_to_page() is used by sg_init_one(). So change padbuf
to be allocated within iscsi_segment.
Signed-off-by: Karen Xie <kxie@chelsio.com>
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/libiscsi_tcp.c')
-rw-r--r-- | drivers/scsi/libiscsi_tcp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c index a745f91d2928..e7705d3532c9 100644 --- a/drivers/scsi/libiscsi_tcp.c +++ b/drivers/scsi/libiscsi_tcp.c | |||
@@ -177,7 +177,6 @@ int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn, | |||
177 | struct iscsi_segment *segment, int recv, | 177 | struct iscsi_segment *segment, int recv, |
178 | unsigned copied) | 178 | unsigned copied) |
179 | { | 179 | { |
180 | static unsigned char padbuf[ISCSI_PAD_LEN]; | ||
181 | struct scatterlist sg; | 180 | struct scatterlist sg; |
182 | unsigned int pad; | 181 | unsigned int pad; |
183 | 182 | ||
@@ -233,7 +232,7 @@ int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn, | |||
233 | debug_tcp("consume %d pad bytes\n", pad); | 232 | debug_tcp("consume %d pad bytes\n", pad); |
234 | segment->total_size += pad; | 233 | segment->total_size += pad; |
235 | segment->size = pad; | 234 | segment->size = pad; |
236 | segment->data = padbuf; | 235 | segment->data = segment->padbuf; |
237 | return 0; | 236 | return 0; |
238 | } | 237 | } |
239 | } | 238 | } |