[SK_BUFF]: Some more conversions to skb_copy_from_linear_data
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>
Sat, 31 Mar 2007 14:55:45 +0000 (11:55 -0300)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:28:30 +0000 (22:28 -0700)
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
net/ax25/ax25_in.c
net/decnet/netfilter/dn_rtmsg.c
net/ipv4/tcp_output.c
net/netrom/nr_in.c
net/x25/x25_in.c

index 31c59387a6fca0095246054b9fe4188feb56480c..0ddaff0df217d37e58c0e920f0c401e4dde330cb 100644 (file)
@@ -66,7 +66,9 @@ static int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb)
 
                                        /* Copy data from the fragments */
                                        while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL) {
-                                               memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
+                                               skb_copy_from_linear_data(skbo,
+                                                         skb_put(skbn, skbo->len),
+                                                                         skbo->len);
                                                kfree_skb(skbo);
                                        }
 
index 9e8256a2361e4665e4f1e4d8548c7d8976bafff3..2ee47bab6938cc7b0f86babc9a06be8985860349 100644 (file)
@@ -48,7 +48,7 @@ static struct sk_buff *dnrmg_build_message(struct sk_buff *rt_skb, int *errp)
        rtm = (struct nf_dn_rtmsg *)NLMSG_DATA(nlh);
        rtm->nfdn_ifindex = rt_skb->dev->ifindex;
        ptr = NFDN_RTMSG(rtm);
-       memcpy(ptr, rt_skb->data, rt_skb->len);
+       skb_copy_from_linear_data(rt_skb, ptr, rt_skb->len);
        nlh->nlmsg_len = skb->tail - old_tail;
        return skb;
 
index c22cdcd8432062ba15d1b6e3d97c8e3b5dc99940..94d9f0c63682a64b4df897cc8ccb4707bfe2167a 100644 (file)
@@ -1645,7 +1645,9 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m
                /* Ok.  We will be able to collapse the packet. */
                tcp_unlink_write_queue(next_skb, sk);
 
-               memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size);
+               skb_copy_from_linear_data(next_skb,
+                                         skb_put(skb, next_skb_size),
+                                         next_skb_size);
 
                if (next_skb->ip_summed == CHECKSUM_PARTIAL)
                        skb->ip_summed = CHECKSUM_PARTIAL;
index e6dc749e14be278cdc4ce86acc97b191a820c2ee..68176483617f36c6c83df1bf5978753c4ab2755f 100644 (file)
@@ -54,7 +54,9 @@ static int nr_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)
                skb_reset_transport_header(skbn);
 
                while ((skbo = skb_dequeue(&nr->frag_queue)) != NULL) {
-                       memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
+                       skb_copy_from_linear_data(skbo,
+                                                 skb_put(skbn, skbo->len),
+                                                 skbo->len);
                        kfree_skb(skbo);
                }
 
index ba13248aa1c31ba79f36f7d52702c2e0b45b361c..1c88762c27943858bbc55394eb0fec6cbf053932 100644 (file)
@@ -56,14 +56,17 @@ static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)
                skb_reset_transport_header(skbn);
 
                skbo = skb_dequeue(&x25->fragment_queue);
-               memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
+               skb_copy_from_linear_data(skbo, skb_put(skbn, skbo->len),
+                                         skbo->len);
                kfree_skb(skbo);
 
                while ((skbo =
                        skb_dequeue(&x25->fragment_queue)) != NULL) {
                        skb_pull(skbo, (x25->neighbour->extended) ?
                                        X25_EXT_MIN_LEN : X25_STD_MIN_LEN);
-                       memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
+                       skb_copy_from_linear_data(skbo,
+                                                 skb_put(skbn, skbo->len),
+                                                 skbo->len);
                        kfree_skb(skbo);
                }