kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* smatch: module_init unwinding on errors
@ 2010-07-29 17:43 Dan Carpenter
  2010-07-29 18:00 ` Randy Dunlap
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dan Carpenter @ 2010-07-29 17:43 UTC (permalink / raw)
  To: kernel-janitors

Sort of inspired by Vasiliy's coccinelle work, I wrote a Smatch script to
verify that modules unwind on errors.

http://repo.or.cz/w/smatch.git/blob/HEAD:/check_unwind.c 

The heuristic is if you
	* call request_irq() 
	* it possibly succeeded
	* you don't call free_irq() 
	* you're in a function that returns an int
	* you are returning non-zero
Then complain.

One question that I had was for, "foo = request_region(bar, size)"
should we call release_region() on "foo" or on "bar"?

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-08-06  6:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-29 17:43 smatch: module_init unwinding on errors Dan Carpenter
2010-07-29 18:00 ` Randy Dunlap
2010-07-29 20:18 ` Dan Carpenter
2010-08-05 21:19 ` Randy Dunlap
2010-08-06  6:28 ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).