Showing error 1203

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: drivers/infiniband/core/cma.c
Line in file: 2839
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-30 10:52:00 UTC


Source:

2809
2810out:
2811        mutex_unlock(&lock);
2812        return ret;
2813}
2814
2815static struct notifier_block cma_nb = {
2816        .notifier_call = cma_netdev_callback
2817};
2818
2819static void cma_add_one(struct ib_device *device)
2820{
2821        struct cma_device *cma_dev;
2822        struct rdma_id_private *id_priv;
2823
2824        cma_dev = kmalloc(sizeof *cma_dev, GFP_KERNEL);
2825        if (!cma_dev)
2826                return;
2827
2828        cma_dev->device = device;
2829
2830        init_completion(&cma_dev->comp);
2831        atomic_set(&cma_dev->refcount, 1);
2832        INIT_LIST_HEAD(&cma_dev->id_list);
2833        ib_set_client_data(device, &cma_client, cma_dev);
2834
2835        mutex_lock(&lock);
2836        list_add_tail(&cma_dev->list, &dev_list);
2837        list_for_each_entry(id_priv, &listen_any_list, list)
2838                cma_listen_on_dev(id_priv, cma_dev);
2839        mutex_unlock(&lock);
2840}
2841
2842static int cma_remove_id_dev(struct rdma_id_private *id_priv)
2843{
2844        struct rdma_cm_event event;
2845        enum cma_state state;
2846        int ret = 0;
2847
2848        /* Record that we want to remove the device */
2849        state = cma_exch(id_priv, CMA_DEVICE_REMOVAL);
Show full sources