From: Steve Wise Date: Tue, 6 Mar 2007 20:44:05 +0000 (-0600) Subject: RDMA/cxgb3: Don't reuse skbs that are non-linear or cloned X-Git-Tag: v2.6.21-rc4~79^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1f6a849b7ce6c3007088cd437dfc2b9c7cb5d21e;p=linux-2.6-omap-h63xx.git RDMA/cxgb3: Don't reuse skbs that are non-linear or cloned Signed-off-by: Steve Wise Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index 3cf79ce64bd..d0ed1d35ca3 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c @@ -305,8 +305,7 @@ static int status2errno(int status) */ static struct sk_buff *get_skb(struct sk_buff *skb, int len, gfp_t gfp) { - if (skb) { - BUG_ON(skb_cloned(skb)); + if (skb && !skb_is_nonlinear(skb) && !skb_cloned(skb)) { skb_trim(skb, 0); skb_get(skb); } else {