diff options
Diffstat (limited to 'drivers/scsi/libiscsi_tcp.c')
-rw-r--r-- | drivers/scsi/libiscsi_tcp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c index 9923e9e3b884..c3fe3f3a78f5 100644 --- a/drivers/scsi/libiscsi_tcp.c +++ b/drivers/scsi/libiscsi_tcp.c | |||
@@ -129,12 +129,17 @@ static void iscsi_tcp_segment_map(struct iscsi_segment *segment, int recv) | |||
129 | BUG_ON(sg->length == 0); | 129 | BUG_ON(sg->length == 0); |
130 | 130 | ||
131 | /* | 131 | /* |
132 | * We always map for the recv path. | ||
133 | * | ||
132 | * If the page count is greater than one it is ok to send | 134 | * If the page count is greater than one it is ok to send |
133 | * to the network layer's zero copy send path. If not we | 135 | * to the network layer's zero copy send path. If not we |
134 | * have to go the slow sendmsg path. We always map for the | 136 | * have to go the slow sendmsg path. |
135 | * recv path. | 137 | * |
138 | * Same goes for slab pages: skb_can_coalesce() allows | ||
139 | * coalescing neighboring slab objects into a single frag which | ||
140 | * triggers one of hardened usercopy checks. | ||
136 | */ | 141 | */ |
137 | if (page_count(sg_page(sg)) >= 1 && !recv) | 142 | if (!recv && page_count(sg_page(sg)) >= 1 && !PageSlab(sg_page(sg))) |
138 | return; | 143 | return; |
139 | 144 | ||
140 | if (recv) { | 145 | if (recv) { |