RDMA/cxgb3: Don't reuse skbs that are non-linear or cloned
authorSteve Wise <swise@opengridcomputing.com>
Tue, 6 Mar 2007 20:44:05 +0000 (14:44 -0600)
committerRoland Dreier <rolandd@cisco.com>
Tue, 6 Mar 2007 20:50:57 +0000 (12:50 -0800)
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/cxgb3/iwch_cm.c

index 3cf79ce64bd35a98e94eb560f981cafa858e3d4a..d0ed1d35ca3ebda4a171393fd1c6122aa916e9dd 100644 (file)
@@ -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 {