diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/fib_trie.c | 7 | ||||
-rw-r--r-- | net/ipv4/ip_fragment.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index a7d089eb042e..ce6cb34e28e1 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -177,10 +177,13 @@ static inline struct tnode *node_parent_rcu(struct node *node) | |||
177 | return rcu_dereference(ret); | 177 | return rcu_dereference(ret); |
178 | } | 178 | } |
179 | 179 | ||
180 | /* Same as rcu_assign_pointer | ||
181 | * but that macro() assumes that value is a pointer. | ||
182 | */ | ||
180 | static inline void node_set_parent(struct node *node, struct tnode *ptr) | 183 | static inline void node_set_parent(struct node *node, struct tnode *ptr) |
181 | { | 184 | { |
182 | rcu_assign_pointer(node->parent, | 185 | smp_wmb(); |
183 | (unsigned long)ptr | NODE_TYPE(node)); | 186 | node->parent = (unsigned long)ptr | NODE_TYPE(node); |
184 | } | 187 | } |
185 | 188 | ||
186 | static inline struct node *tnode_get_child(struct tnode *tn, unsigned int i) | 189 | static inline struct node *tnode_get_child(struct tnode *tn, unsigned int i) |
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index a2e92f9709db..3b2e5adca838 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -568,7 +568,7 @@ int ip_defrag(struct sk_buff *skb, u32 user) | |||
568 | 568 | ||
569 | IP_INC_STATS_BH(IPSTATS_MIB_REASMREQDS); | 569 | IP_INC_STATS_BH(IPSTATS_MIB_REASMREQDS); |
570 | 570 | ||
571 | net = skb->dev->nd_net; | 571 | net = skb->dev ? skb->dev->nd_net : skb->dst->dev->nd_net; |
572 | /* Start by cleaning up the memory. */ | 572 | /* Start by cleaning up the memory. */ |
573 | if (atomic_read(&net->ipv4.frags.mem) > net->ipv4.frags.high_thresh) | 573 | if (atomic_read(&net->ipv4.frags.mem) > net->ipv4.frags.high_thresh) |
574 | ip_evictor(net); | 574 | ip_evictor(net); |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index e0fbc25ca816..58ac838bf460 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -735,7 +735,7 @@ new_segment: | |||
735 | if (!(psize -= copy)) | 735 | if (!(psize -= copy)) |
736 | goto out; | 736 | goto out; |
737 | 737 | ||
738 | if (skb->len < mss_now || (flags & MSG_OOB)) | 738 | if (skb->len < size_goal || (flags & MSG_OOB)) |
739 | continue; | 739 | continue; |
740 | 740 | ||
741 | if (forced_push(tp)) { | 741 | if (forced_push(tp)) { |
@@ -981,7 +981,7 @@ new_segment: | |||
981 | if ((seglen -= copy) == 0 && iovlen == 0) | 981 | if ((seglen -= copy) == 0 && iovlen == 0) |
982 | goto out; | 982 | goto out; |
983 | 983 | ||
984 | if (skb->len < mss_now || (flags & MSG_OOB)) | 984 | if (skb->len < size_goal || (flags & MSG_OOB)) |
985 | continue; | 985 | continue; |
986 | 986 | ||
987 | if (forced_push(tp)) { | 987 | if (forced_push(tp)) { |