Showing error 529

User: Jiri Slaby
Error type: Calling function from invalid context
Error type description: Some function is called at inappropriate place like sleep inside critical sections or interrupt handlers
File location: net/mac80211/mesh_hwmp.c
Line in file: 637
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:02 UTC


Source:

607                if (!last_hop_metric)
608                        return;
609                hwmp_prep_frame_process(sdata, mgmt, elems.prep, last_hop_metric);
610                break;
611        case MPATH_PERR:
612                if (!elems.perr || elems.perr_len != 12)
613                        /* Right now we support only one destination per PERR */
614                        return;
615                hwmp_perr_frame_process(sdata, mgmt, elems.perr);
616        default:
617                return;
618        }
619
620}
621
622/**
623 * mesh_queue_preq - queue a PREQ to a given destination
624 *
625 * @mpath: mesh path to discover
626 * @flags: special attributes of the PREQ to be sent
627 *
628 * Locking: the function must be called from within a rcu read lock block.
629 *
630 */
631static void mesh_queue_preq(struct mesh_path *mpath, u8 flags)
632{
633        struct ieee80211_sub_if_data *sdata = mpath->sdata;
634        struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
635        struct mesh_preq_queue *preq_node;
636
637        preq_node = kmalloc(sizeof(struct mesh_preq_queue), GFP_KERNEL);
638        if (!preq_node) {
639                printk(KERN_DEBUG "Mesh HWMP: could not allocate PREQ node\n");
640                return;
641        }
642
643        spin_lock(&ifmsh->mesh_preq_queue_lock);
644        if (ifmsh->preq_queue_len == MAX_PREQ_QUEUE_LEN) {
645                spin_unlock(&ifmsh->mesh_preq_queue_lock);
646                kfree(preq_node);
647                if (printk_ratelimit())
Show full sources