[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>

authored by Karen Xie and committed by James Bottomley 2856830b 2f4c782c

Changed files
+2 -2
drivers
include
+1 -2
drivers/scsi/libiscsi_tcp.c
··· 177 struct iscsi_segment *segment, int recv, 178 unsigned copied) 179 { 180 - static unsigned char padbuf[ISCSI_PAD_LEN]; 181 struct scatterlist sg; 182 unsigned int pad; 183 ··· 232 debug_tcp("consume %d pad bytes\n", pad); 233 segment->total_size += pad; 234 segment->size = pad; 235 - segment->data = padbuf; 236 return 0; 237 } 238 }
··· 177 struct iscsi_segment *segment, int recv, 178 unsigned copied) 179 { 180 struct scatterlist sg; 181 unsigned int pad; 182 ··· 233 debug_tcp("consume %d pad bytes\n", pad); 234 segment->total_size += pad; 235 segment->size = pad; 236 + segment->data = segment->padbuf; 237 return 0; 238 } 239 }
+1
include/scsi/libiscsi_tcp.h
··· 39 unsigned int total_copied; 40 41 struct hash_desc *hash; 42 unsigned char recv_digest[ISCSI_DIGEST_SIZE]; 43 unsigned char digest[ISCSI_DIGEST_SIZE]; 44 unsigned int digest_len;
··· 39 unsigned int total_copied; 40 41 struct hash_desc *hash; 42 + unsigned char padbuf[ISCSI_PAD_LEN]; 43 unsigned char recv_digest[ISCSI_DIGEST_SIZE]; 44 unsigned char digest[ISCSI_DIGEST_SIZE]; 45 unsigned int digest_len;