Showing error 1100

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


Source:

 945{
 946        unsigned mask = POLLOUT | POLLWRNORM;
 947        struct fuse_conn *fc = fuse_get_conn(file);
 948        if (!fc)
 949                return POLLERR;
 950
 951        poll_wait(file, &fc->waitq, wait);
 952
 953        spin_lock(&fc->lock);
 954        if (!fc->connected)
 955                mask = POLLERR;
 956        else if (request_pending(fc))
 957                mask |= POLLIN | POLLRDNORM;
 958        spin_unlock(&fc->lock);
 959
 960        return mask;
 961}
 962
 963/*
 964 * Abort all requests on the given list (pending or processing)
 965 *
 966 * This function releases and reacquires fc->lock
 967 */
 968static void end_requests(struct fuse_conn *fc, struct list_head *head)
 969{
 970        while (!list_empty(head)) {
 971                struct fuse_req *req;
 972                req = list_entry(head->next, struct fuse_req, list);
 973                req->out.h.error = -ECONNABORTED;
 974                request_end(fc, req);
 975                spin_lock(&fc->lock);
 976        }
 977}
 978
 979/*
 980 * Abort requests under I/O
 981 *
 982 * The requests are set to aborted and finished, and the request
 983 * waiter is woken up.  This will make request_wait_answer() wait
 984 * until the request is unlocked and then return.
 985 *
Show full sources