Re: [PATCH] iscsi_tcp - make padbuf non-static

2009-01-14 Thread James Bottomley

On Thu, 2009-01-08 at 15:06 -0600, Mike Christie wrote:
 Karen Xie wrote:
  [PATCH] iscsi_tcp - make padbuf non-static
  
  From: Karen Xie k...@chelsio.com
  
  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 k...@chelsio.com
 
 
 Thanks for finding this.
 
 Acked-by: Mike Christie micha...@cs.wisc.edu

Could one of you regenerate this against current git head, please, it
seems to have suffered from the iscsi to libiscsi move.

James



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



[PATCH] iscsi_tcp - make padbuf non-static

2009-01-08 Thread Karen Xie

[PATCH] iscsi_tcp - make padbuf non-static

From: Karen Xie k...@chelsio.com

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 k...@chelsio.com
---

 drivers/scsi/iscsi_tcp.c |3 +--
 drivers/scsi/iscsi_tcp.h |1 +
 2 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index ed6c54c..3b07868 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -190,7 +190,6 @@ iscsi_tcp_segment_splice_digest(struct iscsi_segment 
*segment, void *digest)
 static inline int
 iscsi_tcp_segment_done(struct iscsi_segment *segment, int recv, unsigned 
copied)
 {
-   static unsigned char padbuf[ISCSI_PAD_LEN];
struct scatterlist sg;
unsigned int pad;
 
@@ -245,7 +244,7 @@ iscsi_tcp_segment_done(struct iscsi_segment *segment, int 
recv, unsigned copied)
debug_tcp(consume %d pad bytes\n, pad);
segment-total_size += pad;
segment-size = pad;
-   segment-data = padbuf;
+   segment-data = segment-padbuf;
return 0;
}
 
diff --git a/drivers/scsi/iscsi_tcp.h b/drivers/scsi/iscsi_tcp.h
index 498d8ca..a906db2 100644
--- a/drivers/scsi/iscsi_tcp.h
+++ b/drivers/scsi/iscsi_tcp.h
@@ -40,6 +40,7 @@ struct iscsi_segment {
unsigned inttotal_copied;
 
struct hash_desc*hash;
+   unsigned char   padbuf[ISCSI_PAD_LEN];
unsigned char   recv_digest[ISCSI_DIGEST_SIZE];
unsigned char   digest[ISCSI_DIGEST_SIZE];
unsigned intdigest_len;

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: [PATCH] iscsi_tcp - make padbuf non-static

2009-01-08 Thread Mike Christie

Karen Xie wrote:
 [PATCH] iscsi_tcp - make padbuf non-static
 
 From: Karen Xie k...@chelsio.com
 
 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 k...@chelsio.com


Thanks for finding this.

Acked-by: Mike Christie micha...@cs.wisc.edu

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---