diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-23 17:36:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-23 17:36:05 -0500 |
commit | d38e84ee39783e00bd0b83a8dd19e54709950912 (patch) | |
tree | c98f6804c6fd7c32238602173a78b04210703042 /include | |
parent | 20f4d6c3a2a23c5d7d9cc7f42fbb943ca7a03d1f (diff) | |
parent | 486a87f1e5624096bd1c09e9e716239597d48dca (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
netns: fix double free at netns creation
veth : add the set_mac_address capability
sunlance: Beyond ARRAY_SIZE of ib->btx_ring
sungem: another error printed one too early
ISDN: fix sc/shmem printk format warning
SMSC: timeout reaches -1
smsc9420: handle magic field of ethtool_eeprom
sundance: missing parentheses?
smsc9420: fix another postfixed timeout
wimax/i2400m: driver loads firmware v1.4 instead of v1.3
vlan: Update skb->mac_header in __vlan_put_tag().
cxgb3: Add support for PCI ID 0x35.
tcp: remove obsoleted comment about different passes
TG3: &&/|| confusion
ATM: misplaced parentheses?
net/mv643xx: don't disable the mib timer too early and lock properly
net/mv643xx: use GFP_ATOMIC while atomic
atl1c: Atheros L1C Gigabit Ethernet driver
net: Kill skb_truesize_check(), it only catches false-positives.
net: forcedeth: Fix wake-on-lan regression
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_vlan.h | 1 | ||||
-rw-r--r-- | include/linux/skbuff.h | 9 | ||||
-rw-r--r-- | include/net/sock.h | 1 |
3 files changed, 1 insertions, 10 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index f8ff918c208f..e1ff5b14310e 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -210,6 +210,7 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci) | |||
210 | 210 | ||
211 | /* Move the mac addresses to the beginning of the new header. */ | 211 | /* Move the mac addresses to the beginning of the new header. */ |
212 | memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN); | 212 | memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN); |
213 | skb->mac_header -= VLAN_HLEN; | ||
213 | 214 | ||
214 | /* first, the ethernet type */ | 215 | /* first, the ethernet type */ |
215 | veth->h_vlan_proto = htons(ETH_P_8021Q); | 216 | veth->h_vlan_proto = htons(ETH_P_8021Q); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index cf2cb50f77d1..9dcf956ad18a 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -416,15 +416,6 @@ extern void skb_over_panic(struct sk_buff *skb, int len, | |||
416 | void *here); | 416 | void *here); |
417 | extern void skb_under_panic(struct sk_buff *skb, int len, | 417 | extern void skb_under_panic(struct sk_buff *skb, int len, |
418 | void *here); | 418 | void *here); |
419 | extern void skb_truesize_bug(struct sk_buff *skb); | ||
420 | |||
421 | static inline void skb_truesize_check(struct sk_buff *skb) | ||
422 | { | ||
423 | int len = sizeof(struct sk_buff) + skb->len; | ||
424 | |||
425 | if (unlikely((int)skb->truesize < len)) | ||
426 | skb_truesize_bug(skb); | ||
427 | } | ||
428 | 419 | ||
429 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, | 420 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, |
430 | int getfrag(void *from, char *to, int offset, | 421 | int getfrag(void *from, char *to, int offset, |
diff --git a/include/net/sock.h b/include/net/sock.h index ce3b5b622683..eefeeaf7fc46 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -860,7 +860,6 @@ static inline void sk_mem_uncharge(struct sock *sk, int size) | |||
860 | 860 | ||
861 | static inline void sk_wmem_free_skb(struct sock *sk, struct sk_buff *skb) | 861 | static inline void sk_wmem_free_skb(struct sock *sk, struct sk_buff *skb) |
862 | { | 862 | { |
863 | skb_truesize_check(skb); | ||
864 | sock_set_flag(sk, SOCK_QUEUE_SHRUNK); | 863 | sock_set_flag(sk, SOCK_QUEUE_SHRUNK); |
865 | sk->sk_wmem_queued -= skb->truesize; | 864 | sk->sk_wmem_queued -= skb->truesize; |
866 | sk_mem_uncharge(sk, skb->truesize); | 865 | sk_mem_uncharge(sk, skb->truesize); |