aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-13 12:06:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:15 -0400
commitbadff6d01a8589a1c828b0bf118903ca38627f4e (patch)
tree89611d7058c612085c58dfb9913ee30ddf04b604 /net
parent0660e03f6b18f19b6bbafe7583265a51b90daf36 (diff)
[SK_BUFF]: Introduce skb_reset_transport_header(skb)
For the common, open coded 'skb->h.raw = skb->data' operation, so that we can later turn skb->h.raw into a offset, reducing the size of struct sk_buff in 64bit land while possibly keeping it as a pointer on 32bit. This one touches just the most simple cases: skb->h.raw = skb->data; skb->h.raw = {skb_push|[__]skb_pull}() The next ones will handle the slightly more "complex" cases. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/appletalk/aarp.c6
-rw-r--r--net/appletalk/ddp.c4
-rw-r--r--net/ax25/af_ax25.c4
-rw-r--r--net/ax25/ax25_in.c8
-rw-r--r--net/bluetooth/af_bluetooth.c2
-rw-r--r--net/bluetooth/hci_core.c9
-rw-r--r--net/bluetooth/hci_sock.c2
-rw-r--r--net/core/dev.c2
-rw-r--r--net/core/netpoll.c2
-rw-r--r--net/decnet/dn_nsp_in.c2
-rw-r--r--net/decnet/dn_nsp_out.c2
-rw-r--r--net/decnet/dn_route.c4
-rw-r--r--net/ipv4/af_inet.c6
-rw-r--r--net/ipv4/ah4.c3
-rw-r--r--net/ipv4/ip_input.c2
-rw-r--r--net/ipv4/ip_output.c2
-rw-r--r--net/ipv4/ipmr.c2
-rw-r--r--net/ipv4/udp.c3
-rw-r--r--net/ipv4/xfrm4_mode_transport.c2
-rw-r--r--net/ipv6/ip6_input.c2
-rw-r--r--net/ipv6/ip6_output.c8
-rw-r--r--net/ipv6/ipv6_sockglue.c4
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c2
-rw-r--r--net/ipv6/reassembly.c2
-rw-r--r--net/ipv6/xfrm6_mode_transport.c2
-rw-r--r--net/ipx/af_ipx.c2
-rw-r--r--net/ipx/ipx_route.c2
-rw-r--r--net/irda/af_irda.c4
-rw-r--r--net/irda/irlap_frame.c2
-rw-r--r--net/iucv/af_iucv.c2
-rw-r--r--net/key/af_key.c2
-rw-r--r--net/llc/llc_sap.c2
-rw-r--r--net/netlink/af_netlink.c2
-rw-r--r--net/netrom/af_netrom.c6
-rw-r--r--net/netrom/nr_in.c2
-rw-r--r--net/netrom/nr_loopback.c2
-rw-r--r--net/rose/af_rose.c2
-rw-r--r--net/rose/rose_loopback.c2
-rw-r--r--net/rose/rose_route.c2
-rw-r--r--net/unix/af_unix.c2
-rw-r--r--net/x25/af_x25.c3
-rw-r--r--net/x25/x25_dev.c2
-rw-r--r--net/x25/x25_in.c2
43 files changed, 67 insertions, 63 deletions
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
index de495c57aa9..5ef6a238bdb 100644
--- a/net/appletalk/aarp.c
+++ b/net/appletalk/aarp.c
@@ -119,7 +119,7 @@ static void __aarp_send_query(struct aarp_entry *a)
119 /* Set up the buffer */ 119 /* Set up the buffer */
120 skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); 120 skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length);
121 skb_reset_network_header(skb); 121 skb_reset_network_header(skb);
122 skb->h.raw = skb->data; 122 skb_reset_transport_header(skb);
123 skb_put(skb, sizeof(*eah)); 123 skb_put(skb, sizeof(*eah));
124 skb->protocol = htons(ETH_P_ATALK); 124 skb->protocol = htons(ETH_P_ATALK);
125 skb->dev = dev; 125 skb->dev = dev;
@@ -166,7 +166,7 @@ static void aarp_send_reply(struct net_device *dev, struct atalk_addr *us,
166 /* Set up the buffer */ 166 /* Set up the buffer */
167 skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); 167 skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length);
168 skb_reset_network_header(skb); 168 skb_reset_network_header(skb);
169 skb->h.raw = skb->data; 169 skb_reset_transport_header(skb);
170 skb_put(skb, sizeof(*eah)); 170 skb_put(skb, sizeof(*eah));
171 skb->protocol = htons(ETH_P_ATALK); 171 skb->protocol = htons(ETH_P_ATALK);
172 skb->dev = dev; 172 skb->dev = dev;
@@ -217,7 +217,7 @@ static void aarp_send_probe(struct net_device *dev, struct atalk_addr *us)
217 /* Set up the buffer */ 217 /* Set up the buffer */
218 skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); 218 skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length);
219 skb_reset_network_header(skb); 219 skb_reset_network_header(skb);
220 skb->h.raw = skb->data; 220 skb_reset_transport_header(skb);
221 skb_put(skb, sizeof(*eah)); 221 skb_put(skb, sizeof(*eah));
222 skb->protocol = htons(ETH_P_ATALK); 222 skb->protocol = htons(ETH_P_ATALK);
223 skb->dev = dev; 223 skb->dev = dev;
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 934f25993ce..137341b4d83 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1275,7 +1275,7 @@ static int handle_ip_over_ddp(struct sk_buff *skb)
1275 skb->protocol = htons(ETH_P_IP); 1275 skb->protocol = htons(ETH_P_IP);
1276 skb_pull(skb, 13); 1276 skb_pull(skb, 13);
1277 skb->dev = dev; 1277 skb->dev = dev;
1278 skb->h.raw = skb->data; 1278 skb_reset_transport_header(skb);
1279 1279
1280 stats = dev->priv; 1280 stats = dev->priv;
1281 stats->rx_packets++; 1281 stats->rx_packets++;
@@ -1522,7 +1522,7 @@ static int ltalk_rcv(struct sk_buff *skb, struct net_device *dev,
1522 /* Non routable, so force a drop if we slip up later */ 1522 /* Non routable, so force a drop if we slip up later */
1523 ddp->deh_len_hops = htons(skb->len + (DDP_MAXHOPS << 10)); 1523 ddp->deh_len_hops = htons(skb->len + (DDP_MAXHOPS << 10));
1524 } 1524 }
1525 skb->h.raw = skb->data; 1525 skb_reset_transport_header(skb);
1526 1526
1527 return atalk_rcv(skb, dev, pt, orig_dev); 1527 return atalk_rcv(skb, dev, pt, orig_dev);
1528freeit: 1528freeit:
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index b1a4d60ce9a..14db01a4ff6 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1631,8 +1631,8 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock,
1631 if (!ax25_sk(sk)->pidincl) 1631 if (!ax25_sk(sk)->pidincl)
1632 skb_pull(skb, 1); /* Remove PID */ 1632 skb_pull(skb, 1); /* Remove PID */
1633 1633
1634 skb->h.raw = skb->data; 1634 skb_reset_transport_header(skb);
1635 copied = skb->len; 1635 copied = skb->len;
1636 1636
1637 if (copied > size) { 1637 if (copied > size) {
1638 copied = size; 1638 copied = size;
diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c
index 3b2aac67026..724ad5ce75d 100644
--- a/net/ax25/ax25_in.c
+++ b/net/ax25/ax25_in.c
@@ -62,7 +62,7 @@ static int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb)
62 62
63 skbn->dev = ax25->ax25_dev->dev; 63 skbn->dev = ax25->ax25_dev->dev;
64 skb_reset_network_header(skbn); 64 skb_reset_network_header(skbn);
65 skbn->h.raw = skbn->data; 65 skb_reset_transport_header(skbn);
66 66
67 /* Copy data from the fragments */ 67 /* Copy data from the fragments */
68 while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL) { 68 while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL) {
@@ -196,7 +196,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
196 * Process the AX.25/LAPB frame. 196 * Process the AX.25/LAPB frame.
197 */ 197 */
198 198
199 skb->h.raw = skb->data; 199 skb_reset_transport_header(skb);
200 200
201 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) { 201 if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
202 kfree_skb(skb); 202 kfree_skb(skb);
@@ -246,7 +246,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
246 switch (skb->data[1]) { 246 switch (skb->data[1]) {
247 case AX25_P_IP: 247 case AX25_P_IP:
248 skb_pull(skb,2); /* drop PID/CTRL */ 248 skb_pull(skb,2); /* drop PID/CTRL */
249 skb->h.raw = skb->data; 249 skb_reset_transport_header(skb);
250 skb_reset_network_header(skb); 250 skb_reset_network_header(skb);
251 skb->dev = dev; 251 skb->dev = dev;
252 skb->pkt_type = PACKET_HOST; 252 skb->pkt_type = PACKET_HOST;
@@ -256,7 +256,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
256 256
257 case AX25_P_ARP: 257 case AX25_P_ARP:
258 skb_pull(skb,2); 258 skb_pull(skb,2);
259 skb->h.raw = skb->data; 259 skb_reset_transport_header(skb);
260 skb_reset_network_header(skb); 260 skb_reset_network_header(skb);
261 skb->dev = dev; 261 skb->dev = dev;
262 skb->pkt_type = PACKET_HOST; 262 skb->pkt_type = PACKET_HOST;
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index c7228cfc621..d942b946ba0 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -221,7 +221,7 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
221 copied = len; 221 copied = len;
222 } 222 }
223 223
224 skb->h.raw = skb->data; 224 skb_reset_transport_header(skb);
225 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); 225 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
226 226
227 skb_free_datagram(sk, skb); 227 skb_free_datagram(sk, skb);
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 64fea0903fd..c11ceb6b3f7 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1074,11 +1074,11 @@ static void hci_add_acl_hdr(struct sk_buff *skb, __u16 handle, __u16 flags)
1074 struct hci_acl_hdr *hdr; 1074 struct hci_acl_hdr *hdr;
1075 int len = skb->len; 1075 int len = skb->len;
1076 1076
1077 hdr = (struct hci_acl_hdr *) skb_push(skb, HCI_ACL_HDR_SIZE); 1077 skb_push(skb, HCI_ACL_HDR_SIZE);
1078 skb_reset_transport_header(skb);
1079 hdr = (struct hci_acl_hdr *)skb->h.raw;
1078 hdr->handle = cpu_to_le16(hci_handle_pack(handle, flags)); 1080 hdr->handle = cpu_to_le16(hci_handle_pack(handle, flags));
1079 hdr->dlen = cpu_to_le16(len); 1081 hdr->dlen = cpu_to_le16(len);
1080
1081 skb->h.raw = (void *) hdr;
1082} 1082}
1083 1083
1084int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags) 1084int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags)
@@ -1143,7 +1143,8 @@ int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb)
1143 hdr.handle = cpu_to_le16(conn->handle); 1143 hdr.handle = cpu_to_le16(conn->handle);
1144 hdr.dlen = skb->len; 1144 hdr.dlen = skb->len;
1145 1145
1146 skb->h.raw = skb_push(skb, HCI_SCO_HDR_SIZE); 1146 skb_push(skb, HCI_SCO_HDR_SIZE);
1147 skb_reset_transport_header(skb);
1147 memcpy(skb->h.raw, &hdr, HCI_SCO_HDR_SIZE); 1148 memcpy(skb->h.raw, &hdr, HCI_SCO_HDR_SIZE);
1148 1149
1149 skb->dev = (void *) hdev; 1150 skb->dev = (void *) hdev;
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 71f5cfbbebb..832b5f44be5 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -375,7 +375,7 @@ static int hci_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
375 copied = len; 375 copied = len;
376 } 376 }
377 377
378 skb->h.raw = skb->data; 378 skb_reset_transport_header(skb);
379 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); 379 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
380 380
381 hci_sock_cmsg(sk, msg, skb); 381 hci_sock_cmsg(sk, msg, skb);
diff --git a/net/core/dev.c b/net/core/dev.c
index 3af0bdc8649..99f15728d9c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1773,7 +1773,7 @@ int netif_receive_skb(struct sk_buff *skb)
1773 __get_cpu_var(netdev_rx_stat).total++; 1773 __get_cpu_var(netdev_rx_stat).total++;
1774 1774
1775 skb_reset_network_header(skb); 1775 skb_reset_network_header(skb);
1776 skb->h.raw = skb->data; 1776 skb_reset_transport_header(skb);
1777 skb->mac_len = skb->nh.raw - skb->mac.raw; 1777 skb->mac_len = skb->nh.raw - skb->mac.raw;
1778 1778
1779 pt_prev = NULL; 1779 pt_prev = NULL;
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 496b06244a8..8b22723d643 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -362,7 +362,7 @@ static void arp_reply(struct sk_buff *skb)
362 return; 362 return;
363 363
364 skb_reset_network_header(skb); 364 skb_reset_network_header(skb);
365 skb->h.raw = skb->data; 365 skb_reset_transport_header(skb);
366 arp = arp_hdr(skb); 366 arp = arp_hdr(skb);
367 367
368 if ((arp->ar_hrd != htons(ARPHRD_ETHER) && 368 if ((arp->ar_hrd != htons(ARPHRD_ETHER) &&
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c
index 9d20904f6f5..d9498a165ac 100644
--- a/net/decnet/dn_nsp_in.c
+++ b/net/decnet/dn_nsp_in.c
@@ -725,7 +725,7 @@ static int dn_nsp_rx_packet(struct sk_buff *skb)
725 if (!pskb_may_pull(skb, 2)) 725 if (!pskb_may_pull(skb, 2))
726 goto free_out; 726 goto free_out;
727 727
728 skb->h.raw = skb->data; 728 skb_reset_transport_header(skb);
729 cb->nsp_flags = *ptr++; 729 cb->nsp_flags = *ptr++;
730 730
731 if (decnet_debug_level & 2) 731 if (decnet_debug_level & 2)
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c
index 2d2cda82c7d..84b8c5b45fe 100644
--- a/net/decnet/dn_nsp_out.c
+++ b/net/decnet/dn_nsp_out.c
@@ -79,7 +79,7 @@ static void dn_nsp_send(struct sk_buff *skb)
79 struct dst_entry *dst; 79 struct dst_entry *dst;
80 struct flowi fl; 80 struct flowi fl;
81 81
82 skb->h.raw = skb->data; 82 skb_reset_transport_header(skb);
83 scp->stamp = jiffies; 83 scp->stamp = jiffies;
84 84
85 dst = sk_dst_check(sk, 0); 85 dst = sk_dst_check(sk, 0);
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 32a7db36c9e..bb73bf16630 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -504,7 +504,7 @@ static int dn_route_rx_long(struct sk_buff *skb)
504 goto drop_it; 504 goto drop_it;
505 505
506 skb_pull(skb, 20); 506 skb_pull(skb, 20);
507 skb->h.raw = skb->data; 507 skb_reset_transport_header(skb);
508 508
509 /* Destination info */ 509 /* Destination info */
510 ptr += 2; 510 ptr += 2;
@@ -542,7 +542,7 @@ static int dn_route_rx_short(struct sk_buff *skb)
542 goto drop_it; 542 goto drop_it;
543 543
544 skb_pull(skb, 5); 544 skb_pull(skb, 5);
545 skb->h.raw = skb->data; 545 skb_reset_transport_header(skb);
546 546
547 cb->dst = *(__le16 *)ptr; 547 cb->dst = *(__le16 *)ptr;
548 ptr += 2; 548 ptr += 2;
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index e7720c72a6e..f011390f19c 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1120,7 +1120,8 @@ static int inet_gso_send_check(struct sk_buff *skb)
1120 if (unlikely(!pskb_may_pull(skb, ihl))) 1120 if (unlikely(!pskb_may_pull(skb, ihl)))
1121 goto out; 1121 goto out;
1122 1122
1123 skb->h.raw = __skb_pull(skb, ihl); 1123 __skb_pull(skb, ihl);
1124 skb_reset_transport_header(skb);
1124 iph = ip_hdr(skb); 1125 iph = ip_hdr(skb);
1125 proto = iph->protocol & (MAX_INET_PROTOS - 1); 1126 proto = iph->protocol & (MAX_INET_PROTOS - 1);
1126 err = -EPROTONOSUPPORT; 1127 err = -EPROTONOSUPPORT;
@@ -1163,7 +1164,8 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
1163 if (unlikely(!pskb_may_pull(skb, ihl))) 1164 if (unlikely(!pskb_may_pull(skb, ihl)))
1164 goto out; 1165 goto out;
1165 1166
1166 skb->h.raw = __skb_pull(skb, ihl); 1167 __skb_pull(skb, ihl);
1168 skb_reset_transport_header(skb);
1167 iph = ip_hdr(skb); 1169 iph = ip_hdr(skb);
1168 id = ntohs(iph->id); 1170 id = ntohs(iph->id);
1169 proto = iph->protocol & (MAX_INET_PROTOS - 1); 1171 proto = iph->protocol & (MAX_INET_PROTOS - 1);
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c
index 00fd31da252..ebcc797e1c1 100644
--- a/net/ipv4/ah4.c
+++ b/net/ipv4/ah4.c
@@ -182,7 +182,8 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
182 } 182 }
183 ((struct iphdr*)work_buf)->protocol = ah->nexthdr; 183 ((struct iphdr*)work_buf)->protocol = ah->nexthdr;
184 skb->nh.raw += ah_hlen; 184 skb->nh.raw += ah_hlen;
185 skb->h.raw = memcpy(skb_network_header(skb), work_buf, ihl); 185 memcpy(skb_network_header(skb), work_buf, ihl);
186 skb->h.raw = skb->nh.raw;
186 __skb_pull(skb, ah_hlen + ihl); 187 __skb_pull(skb, ah_hlen + ihl);
187 188
188 return 0; 189 return 0;
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
index 237880a8043..324e7e0fdb2 100644
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -201,7 +201,7 @@ static inline int ip_local_deliver_finish(struct sk_buff *skb)
201 __skb_pull(skb, ip_hdrlen(skb)); 201 __skb_pull(skb, ip_hdrlen(skb));
202 202
203 /* Point into the IP datagram, just past the header. */ 203 /* Point into the IP datagram, just past the header. */
204 skb->h.raw = skb->data; 204 skb_reset_transport_header(skb);
205 205
206 rcu_read_lock(); 206 rcu_read_lock();
207 { 207 {
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 1abc48899f2..63c05be0764 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -500,7 +500,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
500 * before previous one went down. */ 500 * before previous one went down. */
501 if (frag) { 501 if (frag) {
502 frag->ip_summed = CHECKSUM_NONE; 502 frag->ip_summed = CHECKSUM_NONE;
503 frag->h.raw = frag->data; 503 skb_reset_transport_header(frag);
504 __skb_push(frag, hlen); 504 __skb_push(frag, hlen);
505 skb_reset_network_header(frag); 505 skb_reset_network_header(frag);
506 memcpy(skb_network_header(frag), iph, hlen); 506 memcpy(skb_network_header(frag), iph, hlen);
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index e0021499093..03869d91f6f 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -563,7 +563,7 @@ static int ipmr_cache_report(struct sk_buff *pkt, vifi_t vifi, int assert)
563 */ 563 */
564 skb_push(skb, sizeof(struct iphdr)); 564 skb_push(skb, sizeof(struct iphdr));
565 skb_reset_network_header(skb); 565 skb_reset_network_header(skb);
566 skb->h.raw = skb->data; 566 skb_reset_transport_header(skb);
567 msg = (struct igmpmsg *)skb_network_header(skb); 567 msg = (struct igmpmsg *)skb_network_header(skb);
568 memcpy(msg, skb_network_header(pkt), sizeof(struct iphdr)); 568 memcpy(msg, skb_network_header(pkt), sizeof(struct iphdr));
569 msg->im_msgtype = IGMPMSG_WHOLEPKT; 569 msg->im_msgtype = IGMPMSG_WHOLEPKT;
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index b4cad50c18e..13739cd8206 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1002,7 +1002,8 @@ static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb)
1002 * transport header to point to ESP. Keep UDP on the stack 1002 * transport header to point to ESP. Keep UDP on the stack
1003 * for later. 1003 * for later.
1004 */ 1004 */
1005 skb->h.raw = __skb_pull(skb, len); 1005 __skb_pull(skb, len);
1006 skb_reset_transport_header(skb);
1006 1007
1007 /* modify the protocol (it's ESP!) */ 1008 /* modify the protocol (it's ESP!) */
1008 iph->protocol = IPPROTO_ESP; 1009 iph->protocol = IPPROTO_ESP;
diff --git a/net/ipv4/xfrm4_mode_transport.c b/net/ipv4/xfrm4_mode_transport.c
index 124f24bc4db..2c46cbb3bbb 100644
--- a/net/ipv4/xfrm4_mode_transport.c
+++ b/net/ipv4/xfrm4_mode_transport.c
@@ -52,7 +52,7 @@ static int xfrm4_transport_input(struct xfrm_state *x, struct sk_buff *skb)
52 skb->nh.raw = skb->h.raw; 52 skb->nh.raw = skb->h.raw;
53 } 53 }
54 ip_hdr(skb)->tot_len = htons(skb->len + ihl); 54 ip_hdr(skb)->tot_len = htons(skb->len + ihl);
55 skb->h.raw = skb->data; 55 skb_reset_transport_header(skb);
56 return 0; 56 return 0;
57} 57}
58 58
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 9c3c787a21c..2dd32a2ca05 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -101,7 +101,7 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
101 if (hdr->version != 6) 101 if (hdr->version != 6)
102 goto err; 102 goto err;
103 103
104 skb->h.raw = (u8 *)(hdr + 1); 104 skb->h.raw = skb->nh.raw + sizeof(*hdr);
105 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); 105 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);
106 106
107 pkt_len = ntohs(hdr->payload_len); 107 pkt_len = ntohs(hdr->payload_len);
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 1900c622686..0f4434eff66 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -654,7 +654,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
654 * before previous one went down. */ 654 * before previous one went down. */
655 if (frag) { 655 if (frag) {
656 frag->ip_summed = CHECKSUM_NONE; 656 frag->ip_summed = CHECKSUM_NONE;
657 frag->h.raw = frag->data; 657 skb_reset_transport_header(frag);
658 fh = (struct frag_hdr*)__skb_push(frag, sizeof(struct frag_hdr)); 658 fh = (struct frag_hdr*)__skb_push(frag, sizeof(struct frag_hdr));
659 __skb_push(frag, hlen); 659 __skb_push(frag, hlen);
660 skb_reset_network_header(frag); 660 skb_reset_network_header(frag);
@@ -747,8 +747,8 @@ slow_path:
747 skb_reserve(frag, LL_RESERVED_SPACE(rt->u.dst.dev)); 747 skb_reserve(frag, LL_RESERVED_SPACE(rt->u.dst.dev));
748 skb_put(frag, len + hlen + sizeof(struct frag_hdr)); 748 skb_put(frag, len + hlen + sizeof(struct frag_hdr));
749 skb_reset_network_header(frag); 749 skb_reset_network_header(frag);
750 fh = (struct frag_hdr*)(frag->data + hlen); 750 fh = (struct frag_hdr *)(skb_network_header(frag) + hlen);
751 frag->h.raw = frag->data + hlen + sizeof(struct frag_hdr); 751 frag->h.raw = frag->nh.raw + hlen + sizeof(struct frag_hdr);
752 752
753 /* 753 /*
754 * Charge the memory for the fragment to any owner 754 * Charge the memory for the fragment to any owner
@@ -991,7 +991,7 @@ static inline int ip6_ufo_append_data(struct sock *sk,
991 skb_reset_network_header(skb); 991 skb_reset_network_header(skb);
992 992
993 /* initialize protocol header pointer */ 993 /* initialize protocol header pointer */
994 skb->h.raw = skb->data + fragheaderlen; 994 skb->h.raw = skb->nh.raw + fragheaderlen;
995 995
996 skb->ip_summed = CHECKSUM_PARTIAL; 996 skb->ip_summed = CHECKSUM_PARTIAL;
997 skb->csum = 0; 997 skb->csum = 0;
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index d16e0fd2cd8..da930fa089c 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -108,7 +108,7 @@ static int ipv6_gso_send_check(struct sk_buff *skb)
108 rcu_read_lock(); 108 rcu_read_lock();
109 ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); 109 ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr);
110 if (likely(ops && ops->gso_send_check)) { 110 if (likely(ops && ops->gso_send_check)) {
111 skb->h.raw = skb->data; 111 skb_reset_transport_header(skb);
112 err = ops->gso_send_check(skb); 112 err = ops->gso_send_check(skb);
113 } 113 }
114 rcu_read_unlock(); 114 rcu_read_unlock();
@@ -144,7 +144,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features)
144 rcu_read_lock(); 144 rcu_read_lock();
145 ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); 145 ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr);
146 if (likely(ops && ops->gso_segment)) { 146 if (likely(ops && ops->gso_segment)) {
147 skb->h.raw = skb->data; 147 skb_reset_transport_header(skb);
148 segs = ops->gso_segment(skb, features); 148 segs = ops->gso_segment(skb, features);
149 } 149 }
150 rcu_read_unlock(); 150 rcu_read_unlock();
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index d3fbb1f1caf..75138cf1fa6 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -634,7 +634,7 @@ nf_ct_frag6_reasm(struct nf_ct_frag6_queue *fq, struct net_device *dev)
634 head->nh.raw += sizeof(struct frag_hdr); 634 head->nh.raw += sizeof(struct frag_hdr);
635 635
636 skb_shinfo(head)->frag_list = head->next; 636 skb_shinfo(head)->frag_list = head->next;
637 head->h.raw = head->data; 637 skb_reset_transport_header(head);
638 skb_push(head, head->data - skb_network_header(head)); 638 skb_push(head, head->data - skb_network_header(head));
639 atomic_sub(head->truesize, &nf_ct_frag6_mem); 639 atomic_sub(head->truesize, &nf_ct_frag6_mem);
640 640
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 156a37fe3ff..2594f0fb290 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -653,7 +653,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff **skb_in,
653 head->nh.raw += sizeof(struct frag_hdr); 653 head->nh.raw += sizeof(struct frag_hdr);
654 654
655 skb_shinfo(head)->frag_list = head->next; 655 skb_shinfo(head)->frag_list = head->next;
656 head->h.raw = head->data; 656 skb_reset_transport_header(head);
657 skb_push(head, head->data - skb_network_header(head)); 657 skb_push(head, head->data - skb_network_header(head));
658 atomic_sub(head->truesize, &ip6_frag_mem); 658 atomic_sub(head->truesize, &ip6_frag_mem);
659 659
diff --git a/net/ipv6/xfrm6_mode_transport.c b/net/ipv6/xfrm6_mode_transport.c
index 358b60d9d91..cae6cacd58c 100644
--- a/net/ipv6/xfrm6_mode_transport.c
+++ b/net/ipv6/xfrm6_mode_transport.c
@@ -59,7 +59,7 @@ static int xfrm6_transport_input(struct xfrm_state *x, struct sk_buff *skb)
59 } 59 }
60 ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - 60 ipv6_hdr(skb)->payload_len = htons(skb->len + ihl -
61 sizeof(struct ipv6hdr)); 61 sizeof(struct ipv6hdr));
62 skb->h.raw = skb->data; 62 skb_reset_transport_header(skb);
63 return 0; 63 return 0;
64} 64}
65 65
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 9aa7b961b3e..392f8bc9269 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -577,7 +577,7 @@ static struct sk_buff *ipxitf_adjust_skbuff(struct ipx_interface *intrfc,
577 if (skb2) { 577 if (skb2) {
578 skb_reserve(skb2, out_offset); 578 skb_reserve(skb2, out_offset);
579 skb_reset_network_header(skb2); 579 skb_reset_network_header(skb2);
580 skb2->h.raw = skb2->data; 580 skb_reset_transport_header(skb2);
581 skb_put(skb2, skb->len); 581 skb_put(skb2, skb->len);
582 memcpy(ipx_hdr(skb2), ipx_hdr(skb), skb->len); 582 memcpy(ipx_hdr(skb2), ipx_hdr(skb), skb->len);
583 memcpy(skb2->cb, skb->cb, sizeof(skb->cb)); 583 memcpy(skb2->cb, skb->cb, sizeof(skb->cb));
diff --git a/net/ipx/ipx_route.c b/net/ipx/ipx_route.c
index e8277f544e7..e16c1142352 100644
--- a/net/ipx/ipx_route.c
+++ b/net/ipx/ipx_route.c
@@ -204,7 +204,7 @@ int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx,
204 204
205 /* Fill in IPX header */ 205 /* Fill in IPX header */
206 skb_reset_network_header(skb); 206 skb_reset_network_header(skb);
207 skb->h.raw = skb->data; 207 skb_reset_transport_header(skb);
208 skb_put(skb, sizeof(struct ipxhdr)); 208 skb_put(skb, sizeof(struct ipxhdr));
209 ipx = ipx_hdr(skb); 209 ipx = ipx_hdr(skb);
210 ipx->ipx_pktsize = htons(len + sizeof(struct ipxhdr)); 210 ipx->ipx_pktsize = htons(len + sizeof(struct ipxhdr));
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 0eb7d596d47..c3cd2ba123e 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -1363,8 +1363,8 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
1363 if (!skb) 1363 if (!skb)
1364 return err; 1364 return err;
1365 1365
1366 skb->h.raw = skb->data; 1366 skb_reset_transport_header(skb);
1367 copied = skb->len; 1367 copied = skb->len;
1368 1368
1369 if (copied > size) { 1369 if (copied > size) {
1370 IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n", 1370 IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n",
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
index 7c815de4a3b..803ac418748 100644
--- a/net/irda/irlap_frame.c
+++ b/net/irda/irlap_frame.c
@@ -95,7 +95,7 @@ void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb)
95 skb->dev = self->netdev; 95 skb->dev = self->netdev;
96 skb_reset_mac_header(skb); 96 skb_reset_mac_header(skb);
97 skb_reset_network_header(skb); 97 skb_reset_network_header(skb);
98 skb->h.raw = skb->data; 98 skb_reset_transport_header(skb);
99 skb->protocol = htons(ETH_P_IRDA); 99 skb->protocol = htons(ETH_P_IRDA);
100 skb->priority = TC_PRIO_BESTEFFORT; 100 skb->priority = TC_PRIO_BESTEFFORT;
101 101
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index a485496059c..55632883d17 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -953,7 +953,7 @@ static void iucv_callback_rx(struct iucv_path *path, struct iucv_message *msg)
953 return; 953 return;
954 } 954 }
955 955
956 skb->h.raw = skb->data; 956 skb_reset_transport_header(skb);
957 skb_reset_network_header(skb); 957 skb_reset_network_header(skb);
958 skb->len = msg->length; 958 skb->len = msg->length;
959 } 959 }
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 345019345f0..3cd228aacfe 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3667,7 +3667,7 @@ static int pfkey_recvmsg(struct kiocb *kiocb,
3667 copied = len; 3667 copied = len;
3668 } 3668 }
3669 3669
3670 skb->h.raw = skb->data; 3670 skb_reset_transport_header(skb);
3671 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); 3671 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
3672 if (err) 3672 if (err)
3673 goto out_free; 3673 goto out_free;
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c
index e76bbbfb64b..2525165e2e8 100644
--- a/net/llc/llc_sap.c
+++ b/net/llc/llc_sap.c
@@ -39,7 +39,7 @@ struct sk_buff *llc_alloc_frame(struct sock *sk, struct net_device *dev)
39 skb_reset_mac_header(skb); 39 skb_reset_mac_header(skb);
40 skb_reserve(skb, 50); 40 skb_reserve(skb, 50);
41 skb_reset_network_header(skb); 41 skb_reset_network_header(skb);
42 skb->h.raw = skb->data; 42 skb_reset_transport_header(skb);
43 skb->protocol = htons(ETH_P_802_2); 43 skb->protocol = htons(ETH_P_802_2);
44 skb->dev = dev; 44 skb->dev = dev;
45 if (sk != NULL) 45 if (sk != NULL)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 350ed1c0e70..50dc5edb775 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1215,7 +1215,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
1215 copied = len; 1215 copied = len;
1216 } 1216 }
1217 1217
1218 skb->h.raw = skb->data; 1218 skb_reset_transport_header(skb);
1219 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); 1219 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
1220 1220
1221 if (msg->msg_name) { 1221 if (msg->msg_name) {
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index a54e7ef2568..8d0f30a015d 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -878,7 +878,7 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)
878 if (frametype == NR_PROTOEXT && 878 if (frametype == NR_PROTOEXT &&
879 circuit_index == NR_PROTO_IP && circuit_id == NR_PROTO_IP) { 879 circuit_index == NR_PROTO_IP && circuit_id == NR_PROTO_IP) {
880 skb_pull(skb, NR_NETWORK_LEN + NR_TRANSPORT_LEN); 880 skb_pull(skb, NR_NETWORK_LEN + NR_TRANSPORT_LEN);
881 skb->h.raw = skb->data; 881 skb_reset_transport_header(skb);
882 882
883 return nr_rx_ip(skb, dev); 883 return nr_rx_ip(skb, dev);
884 } 884 }
@@ -904,7 +904,7 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)
904 } 904 }
905 905
906 if (sk != NULL) { 906 if (sk != NULL) {
907 skb->h.raw = skb->data; 907 skb_reset_transport_header(skb);
908 908
909 if (frametype == NR_CONNACK && skb->len == 22) 909 if (frametype == NR_CONNACK && skb->len == 22)
910 nr_sk(sk)->bpqext = 1; 910 nr_sk(sk)->bpqext = 1;
@@ -1149,7 +1149,7 @@ static int nr_recvmsg(struct kiocb *iocb, struct socket *sock,
1149 return er; 1149 return er;
1150 } 1150 }
1151 1151
1152 skb->h.raw = skb->data; 1152 skb_reset_transport_header(skb);
1153 copied = skb->len; 1153 copied = skb->len;
1154 1154
1155 if (copied > size) { 1155 if (copied > size) {
diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c
index 5560acbaaa9..e6dc749e14b 100644
--- a/net/netrom/nr_in.c
+++ b/net/netrom/nr_in.c
@@ -51,7 +51,7 @@ static int nr_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)
51 if ((skbn = alloc_skb(nr->fraglen, GFP_ATOMIC)) == NULL) 51 if ((skbn = alloc_skb(nr->fraglen, GFP_ATOMIC)) == NULL)
52 return 1; 52 return 1;
53 53
54 skbn->h.raw = skbn->data; 54 skb_reset_transport_header(skbn);
55 55
56 while ((skbo = skb_dequeue(&nr->frag_queue)) != NULL) { 56 while ((skbo = skb_dequeue(&nr->frag_queue)) != NULL) {
57 memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len); 57 memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
diff --git a/net/netrom/nr_loopback.c b/net/netrom/nr_loopback.c
index e856ae1b360..99fdab16ded 100644
--- a/net/netrom/nr_loopback.c
+++ b/net/netrom/nr_loopback.c
@@ -35,7 +35,7 @@ int nr_loopback_queue(struct sk_buff *skb)
35 35
36 if ((skbn = alloc_skb(skb->len, GFP_ATOMIC)) != NULL) { 36 if ((skbn = alloc_skb(skb->len, GFP_ATOMIC)) != NULL) {
37 memcpy(skb_put(skbn, skb->len), skb->data, skb->len); 37 memcpy(skb_put(skbn, skb->len), skb->data, skb->len);
38 skbn->h.raw = skbn->data; 38 skb_reset_transport_header(skbn);
39 39
40 skb_queue_tail(&loopback_queue, skbn); 40 skb_queue_tail(&loopback_queue, skbn);
41 41
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index f64be9369ef..6d8684a11ac 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -1234,7 +1234,7 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock,
1234 *asmptr = qbit; 1234 *asmptr = qbit;
1235 } 1235 }
1236 1236
1237 skb->h.raw = skb->data; 1237 skb_reset_transport_header(skb);
1238 copied = skb->len; 1238 copied = skb->len;
1239 1239
1240 if (copied > size) { 1240 if (copied > size) {
diff --git a/net/rose/rose_loopback.c b/net/rose/rose_loopback.c
index 3e41bd93ab9..cd01642f049 100644
--- a/net/rose/rose_loopback.c
+++ b/net/rose/rose_loopback.c
@@ -77,7 +77,7 @@ static void rose_loopback_timer(unsigned long param)
77 dest = (rose_address *)(skb->data + 4); 77 dest = (rose_address *)(skb->data + 4);
78 lci_o = 0xFFF - lci_i; 78 lci_o = 0xFFF - lci_i;
79 79
80 skb->h.raw = skb->data; 80 skb_reset_transport_header(skb);
81 81
82 sk = rose_find_socket(lci_o, &rose_loopback_neigh); 82 sk = rose_find_socket(lci_o, &rose_loopback_neigh);
83 if (sk) { 83 if (sk) {
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index a1233e1b1ab..1f9aefd95a9 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -906,7 +906,7 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25)
906 } 906 }
907 } 907 }
908 else { 908 else {
909 skb->h.raw = skb->data; 909 skb_reset_transport_header(skb);
910 res = rose_process_rx_frame(sk, skb); 910 res = rose_process_rx_frame(sk, skb);
911 goto out; 911 goto out;
912 } 912 }
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 606971645b3..aec8cf165e1 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1319,7 +1319,7 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
1319 unix_attach_fds(siocb->scm, skb); 1319 unix_attach_fds(siocb->scm, skb);
1320 unix_get_secdata(siocb->scm, skb); 1320 unix_get_secdata(siocb->scm, skb);
1321 1321
1322 skb->h.raw = skb->data; 1322 skb_reset_transport_header(skb);
1323 err = memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len); 1323 err = memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len);
1324 if (err) 1324 if (err)
1325 goto out_free; 1325 goto out_free;
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index a1988431562..fc713059ccd 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -1210,8 +1210,7 @@ static int x25_recvmsg(struct kiocb *iocb, struct socket *sock,
1210 } 1210 }
1211 } 1211 }
1212 1212
1213 skb->h.raw = skb->data; 1213 skb_reset_transport_header(skb);
1214
1215 copied = skb->len; 1214 copied = skb->len;
1216 1215
1217 if (copied > size) { 1216 if (copied > size) {
diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c
index 94fd12f3a90..848a6b6f90a 100644
--- a/net/x25/x25_dev.c
+++ b/net/x25/x25_dev.c
@@ -48,7 +48,7 @@ static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb)
48 if ((sk = x25_find_socket(lci, nb)) != NULL) { 48 if ((sk = x25_find_socket(lci, nb)) != NULL) {
49 int queued = 1; 49 int queued = 1;
50 50
51 skb->h.raw = skb->data; 51 skb_reset_transport_header(skb);
52 bh_lock_sock(sk); 52 bh_lock_sock(sk);
53 if (!sock_owned_by_user(sk)) { 53 if (!sock_owned_by_user(sk)) {
54 queued = x25_process_rx_frame(sk, skb); 54 queued = x25_process_rx_frame(sk, skb);
diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c
index c5239fcdefa..b2bbe552a89 100644
--- a/net/x25/x25_in.c
+++ b/net/x25/x25_in.c
@@ -53,7 +53,7 @@ static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)
53 53
54 skb_queue_tail(&x25->fragment_queue, skb); 54 skb_queue_tail(&x25->fragment_queue, skb);
55 55
56 skbn->h.raw = skbn->data; 56 skb_reset_transport_header(skbn);
57 57
58 skbo = skb_dequeue(&x25->fragment_queue); 58 skbo = skb_dequeue(&x25->fragment_queue);
59 memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len); 59 memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);