From: "Peter T. Breuer" <ptb@inv.it.uc3m.es>
To: "linux kernel" <linux-kernel@vger.kernel.org>
Subject: Re: kernel analyser to detect sleep under spinlock
Date: Mon, 22 Nov 2004 11:06:16 +0100 (MET) [thread overview]
Message-ID: <200411221006.iAMA6Gk23164@inv.it.uc3m.es> (raw)
Another minor functional update to the kernel source code analysis tool,
though actually I reorganised it thoroughly internally in order to run
off externally defined trigger-action rules instead of a mess of gunky C
code.
ftp://oboe.it.uc3m.es/pub/Programs/c-1.2.3.tgz
This tool locates "sleep under spinlock" abuses in the kernel.
The latest revision eliminates some false positives, by taking notice of
the second argument to kmalloc where it can.
% ./c -nostdinc -iwithprefix include -D__KERNEL__
-I/usr/local/src/linux-2.6.3/include -D__KERNEL__ -Wall
-Wstrict-prototypes -Wno-trigraphs
-I/usr/local/src/linux-2.6.8.1-uml/include/asm-i386/mach-default -O2
-DMODULE /usr/local/src/linux-2.6.8.1-uml/drivers/block/nbd.c
/usr/local/src/linux-2.6.8.1-uml/drivers/block/nbd.c
/************** sleep calls ************************************
* function line calls (locks)
*
* - /usr/local/src/linux-2.6.3/include/linux/slab.h
* kmalloc 98 __kmalloc (0)
*
* - /usr/local/src/linux-2.6.3/include/linux/fs.h
* lock_super 741 down (0)
*
* - /usr/local/src/linux-2.6.8.1-uml/drivers/block/nbd.c
* nbd_send_req 245 down (0)
* nbd_ioctl 548 down (0)
*
*
* *** found 0 instances of sleep under spinlock ***
*
**************************************************************/
GPL, LGPL, etc.
This is also useful for locating functions which can sleep, though of
course that can be done in other ways.
Peter (ptb (at) inv.it.uc3m.es)
next reply other threads:[~2004-11-22 10:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-22 10:06 Peter T. Breuer [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-11-12 23:45 Peter T. Breuer
2004-11-13 11:09 ` Peter T. Breuer
2004-11-14 15:01 ` Jens Axboe
2004-11-11 4:29 Peter T. Breuer
2004-11-07 23:14 Peter T. Breuer
2004-11-08 1:18 ` Randy.Dunlap
2004-11-08 4:39 ` Peter T. Breuer
2004-11-08 4:43 ` Randy.Dunlap
2004-11-07 23:14 Peter T. Breuer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200411221006.iAMA6Gk23164@inv.it.uc3m.es \
--to=ptb@inv.it.uc3m.es \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®