aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-03-31 15:58:52 -0400
committerDavid S. Miller <davem@davemloft.net>2018-03-31 23:25:39 -0400
commit2d44ed22e607f9a285b049de2263e3840673a260 (patch)
treef091493e1e872420c867d309afd9d03dc547f505
parent399d1404be660d355192ff4df5ccc3f4159ec1e4 (diff)
inet: frags: remove inet_frag_maybe_warn_overflow()
This function is obsolete, after rhashtable addition to inet defrag. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/inet_frag.h2
-rw-r--r--net/ieee802154/6lowpan/reassembly.c5
-rw-r--r--net/ipv4/inet_fragment.c11
-rw-r--r--net/ipv4/ip_fragment.c5
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c5
-rw-r--r--net/ipv6/reassembly.c5
6 files changed, 8 insertions, 25 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 0e8e159d88f7..95e353e3305b 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -110,8 +110,6 @@ void inet_frags_exit_net(struct netns_frags *nf);
110void inet_frag_kill(struct inet_frag_queue *q); 110void inet_frag_kill(struct inet_frag_queue *q);
111void inet_frag_destroy(struct inet_frag_queue *q); 111void inet_frag_destroy(struct inet_frag_queue *q);
112struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key); 112struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key);
113void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
114 const char *prefix);
115 113
116static inline void inet_frag_put(struct inet_frag_queue *q) 114static inline void inet_frag_put(struct inet_frag_queue *q)
117{ 115{
diff --git a/net/ieee802154/6lowpan/reassembly.c b/net/ieee802154/6lowpan/reassembly.c
index 0fa0121f85d4..1aec71a3f904 100644
--- a/net/ieee802154/6lowpan/reassembly.c
+++ b/net/ieee802154/6lowpan/reassembly.c
@@ -84,10 +84,9 @@ fq_find(struct net *net, const struct lowpan_802154_cb *cb,
84 struct inet_frag_queue *q; 84 struct inet_frag_queue *q;
85 85
86 q = inet_frag_find(&ieee802154_lowpan->frags, &key); 86 q = inet_frag_find(&ieee802154_lowpan->frags, &key);
87 if (IS_ERR_OR_NULL(q)) { 87 if (!q)
88 inet_frag_maybe_warn_overflow(q, pr_fmt());
89 return NULL; 88 return NULL;
90 } 89
91 return container_of(q, struct lowpan_frag_queue, q); 90 return container_of(q, struct lowpan_frag_queue, q);
92} 91}
93 92
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index ebb8f411e0db..c9e35b81d093 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -218,14 +218,3 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key)
218 return inet_frag_create(nf, key); 218 return inet_frag_create(nf, key);
219} 219}
220EXPORT_SYMBOL(inet_frag_find); 220EXPORT_SYMBOL(inet_frag_find);
221
222void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
223 const char *prefix)
224{
225 static const char msg[] = "inet_frag_find: Fragment hash bucket"
226 " list length grew over limit. Dropping fragment.\n";
227
228 if (PTR_ERR(q) == -ENOBUFS)
229 net_dbg_ratelimited("%s%s", prefix, msg);
230}
231EXPORT_SYMBOL(inet_frag_maybe_warn_overflow);
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index b844f517b75b..b0366224f314 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -221,10 +221,9 @@ static struct ipq *ip_find(struct net *net, struct iphdr *iph,
221 struct inet_frag_queue *q; 221 struct inet_frag_queue *q;
222 222
223 q = inet_frag_find(&net->ipv4.frags, &key); 223 q = inet_frag_find(&net->ipv4.frags, &key);
224 if (IS_ERR_OR_NULL(q)) { 224 if (!q)
225 inet_frag_maybe_warn_overflow(q, pr_fmt());
226 return NULL; 225 return NULL;
227 } 226
228 return container_of(q, struct ipq, q); 227 return container_of(q, struct ipq, q);
229} 228}
230 229
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 0ad3df551d98..d866412b8f6c 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -178,10 +178,9 @@ static struct frag_queue *fq_find(struct net *net, __be32 id, u32 user,
178 struct inet_frag_queue *q; 178 struct inet_frag_queue *q;
179 179
180 q = inet_frag_find(&net->nf_frag.frags, &key); 180 q = inet_frag_find(&net->nf_frag.frags, &key);
181 if (IS_ERR_OR_NULL(q)) { 181 if (!q)
182 inet_frag_maybe_warn_overflow(q, pr_fmt());
183 return NULL; 182 return NULL;
184 } 183
185 return container_of(q, struct frag_queue, q); 184 return container_of(q, struct frag_queue, q);
186} 185}
187 186
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 70acad126d04..2a77fda5e3bc 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -155,10 +155,9 @@ fq_find(struct net *net, __be32 id, const struct ipv6hdr *hdr, int iif)
155 key.iif = 0; 155 key.iif = 0;
156 156
157 q = inet_frag_find(&net->ipv6.frags, &key); 157 q = inet_frag_find(&net->ipv6.frags, &key);
158 if (IS_ERR_OR_NULL(q)) { 158 if (!q)
159 inet_frag_maybe_warn_overflow(q, pr_fmt());
160 return NULL; 159 return NULL;
161 } 160
162 return container_of(q, struct frag_queue, q); 161 return container_of(q, struct frag_queue, q);
163} 162}
164 163