Showing error 1479

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: net/ipv4/ip_fragment.c
Line in file: 238
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

208                /* Send an ICMP "Fragment Reassembly Timeout" message. */
209                if ((head->dev = dev_get_by_index(net, qp->iif)) != NULL) {
210                        icmp_send(head, ICMP_TIME_EXCEEDED, ICMP_EXC_FRAGTIME, 0);
211                        dev_put(head->dev);
212                }
213        }
214out:
215        spin_unlock(&qp->q.lock);
216        ipq_put(qp);
217}
218
219/* Find the correct entry in the "incomplete datagrams" queue for
220 * this IP datagram, and create new one, if nothing is found.
221 */
222static inline struct ipq *ip_find(struct net *net, struct iphdr *iph, u32 user)
223{
224        struct inet_frag_queue *q;
225        struct ip4_create_arg arg;
226        unsigned int hash;
227
228        arg.iph = iph;
229        arg.user = user;
230
231        read_lock(&ip4_frags.lock);
232        hash = ipqhashfn(iph->id, iph->saddr, iph->daddr, iph->protocol);
233
234        q = inet_frag_find(&net->ipv4.frags, &ip4_frags, &arg, hash);
235        if (q == NULL)
236                goto out_nomem;
237
238        return container_of(q, struct ipq, q);
239
240out_nomem:
241        LIMIT_NETDEBUG(KERN_ERR "ip_frag_create: no memory left !\n");
242        return NULL;
243}
244
245/* Is the fragment too far ahead to be part of ipq? */
246static inline int ip_frag_too_far(struct ipq *qp)
247{
248        struct inet_peer *peer = qp->peer;
Show full sources