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