smatch: module_init unwinding on errors

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

 



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

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux