Showing error 1106

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: fs/ntfs/compress.c
Line in file: 713
Project: Linux Kernel
Project version: 2.6.28
Tools: Clang Static Analyzer (3.0)
Entered: 2012-04-17 12:29:30 UTC


Source:

683                if (buffer_uptodate(tbh))
684                        continue;
685                wait_on_buffer(tbh);
686                /*
687                 * We need an optimization barrier here, otherwise we start
688                 * hitting the below fixup code when accessing a loopback
689                 * mounted ntfs partition. This indicates either there is a
690                 * race condition in the loop driver or, more likely, gcc
691                 * overoptimises the code without the barrier and it doesn't
692                 * do the Right Thing(TM).
693                 */
694                barrier();
695                if (unlikely(!buffer_uptodate(tbh))) {
696                        ntfs_warning(vol->sb, "Buffer is unlocked but not "
697                                        "uptodate! Unplugging the disk queue "
698                                        "and rescheduling.");
699                        get_bh(tbh);
700                        blk_run_address_space(mapping);
701                        schedule();
702                        put_bh(tbh);
703                        if (unlikely(!buffer_uptodate(tbh)))
704                                goto read_err;
705                        ntfs_warning(vol->sb, "Buffer is now uptodate. Good.");
706                }
707        }
708
709        /*
710         * Get the compression buffer. We must not sleep any more
711         * until we are finished with it.
712         */
713        spin_lock(&ntfs_cb_lock);
714        cb = ntfs_compression_buffer;
715
716        BUG_ON(!cb);
717
718        cb_pos = cb;
719        cb_end = cb + cb_size;
720
721        /* Copy the buffer heads into the contiguous buffer. */
722        for (i = 0; i < nr_bhs; i++) {
723                memcpy(cb_pos, bhs[i]->b_data, block_size);
Show full sources