Showing error 913

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: ipc/namespace.c
Line in file: 80
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-02-27 21:22:42 UTC


Source:

 50
 51        new_ns = clone_ipc_ns(ns);
 52
 53        put_ipc_ns(ns);
 54        return new_ns;
 55}
 56
 57/*
 58 * free_ipcs - free all ipcs of one type
 59 * @ns:   the namespace to remove the ipcs from
 60 * @ids:  the table of ipcs to free
 61 * @free: the function called to free each individual ipc
 62 *
 63 * Called for each kind of ipc when an ipc_namespace exits.
 64 */
 65void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
 66               void (*free)(struct ipc_namespace *, struct kern_ipc_perm *))
 67{
 68        struct kern_ipc_perm *perm;
 69        int next_id;
 70        int total, in_use;
 71
 72        down_write(&ids->rw_mutex);
 73
 74        in_use = ids->in_use;
 75
 76        for (total = 0, next_id = 0; total < in_use; next_id++) {
 77                perm = idr_find(&ids->ipcs_idr, next_id);
 78                if (perm == NULL)
 79                        continue;
 80                ipc_lock_by_ptr(perm);
 81                free(ns, perm);
 82                total++;
 83        }
 84        up_write(&ids->rw_mutex);
 85}
 86
 87void free_ipc_ns(struct kref *kref)
 88{
 89        struct ipc_namespace *ns;
 90
Show full sources