Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / net / xfrm / xfrm_algo.c
index 080aae2..6ed3302 100644 (file)
@@ -540,8 +540,7 @@ void skb_icv_walk(const struct sk_buff *skb, struct crypto_tfm *tfm,
                        start = end;
                }
        }
-       if (len)
-               BUG();
+       BUG_ON(len);
 }
 EXPORT_SYMBOL_GPL(skb_icv_walk);
 
@@ -610,8 +609,7 @@ skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
                        start = end;
                }
        }
-       if (len)
-               BUG();
+       BUG_ON(len);
        return elt;
 }
 EXPORT_SYMBOL_GPL(skb_to_sgvec);
@@ -698,7 +696,7 @@ int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff **trailer)
                                return -ENOMEM;
 
                        if (skb1->sk)
-                               skb_set_owner_w(skb, skb1->sk);
+                               skb_set_owner_w(skb2, skb1->sk);
 
                        /* Looking around. Are we still alive?
                         * OK, link new skb, drop old one */