so ... how can i deliberately generate a sparse context error?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  still confused about the sparse __acquires() and __releases()
checking so i tried to break the kernel code ever so slightly just
enough to generate that kind of error.

  randomly grabbed fs/fuse/dev.c and this routine:

...
static void wait_answer_interruptible(struct fuse_conn *fc,
                                      struct fuse_req *req)
        __releases(fc->lock) __acquires(fc->lock)
{
        if (signal_pending(current))
                return;

        spin_unlock(&fc->lock);
        wait_event_interruptible(req->waitq, req->state == FUSE_REQ_FINISHED);
        // spin_lock(&fc->lock);      <-- commented this out
}
...

then ran "make C=1".  i got a number of errors referring to a
non-existent attribute "__cold__", but nothing warning me about a
synchronization mismatch.  so why not?  isn't that the whole point of
that warning?

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux