Showing error 637

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: fs/jffs2/xattr.c
Line in file: 411
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:57 UTC


Source:

 381
 382        rc = save_xattr_datum(c, xd);
 383        if (rc) {
 384                kfree(xd->xname);
 385                jffs2_free_xattr_datum(xd);
 386                return ERR_PTR(rc);
 387        }
 388
 389        /* Insert Hash Index */
 390        i = hashkey % XATTRINDEX_HASHSIZE;
 391        list_add(&xd->xindex, &c->xattrindex[i]);
 392
 393        c->xdatum_mem_usage += (xd->name_len + 1 + xd->value_len);
 394        reclaim_xattr_datum(c);
 395
 396        return xd;
 397}
 398
 399static void unrefer_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd)
 400{
 401        /* must be called under down_write(xattr_sem) */
 402        if (atomic_dec_and_lock(&xd->refcnt, &c->erase_completion_lock)) {
 403                unload_xattr_datum(c, xd);
 404                xd->flags |= JFFS2_XFLAGS_DEAD;
 405                if (xd->node == (void *)xd) {
 406                        BUG_ON(!(xd->flags & JFFS2_XFLAGS_INVALID));
 407                        jffs2_free_xattr_datum(xd);
 408                } else {
 409                        list_add(&xd->xindex, &c->xattr_dead_list);
 410                }
 411                spin_unlock(&c->erase_completion_lock);
 412
 413                dbg_xattr("xdatum(xid=%u, version=%u) was removed.\n",
 414                          xd->xid, xd->version);
 415        }
 416}
 417
 418/* -------- xref related functions ------------------
 419 * verify_xattr_ref(c, ref)
 420 *   is used to load xref information from medium. Because summary data does not
 421 *   contain xid/ino, it's necessary to verify once while mounting process.
Show full sources