From mboxrd@z Thu Jan 1 00:00:00 1970 From: bhat.srivatsa@gmail.com (Srivatsa Bhat) Date: Mon, 29 Oct 2012 00:03:08 +0530 Subject: Tools for checking incorrect usage of locking techniques in k-space In-Reply-To: <20121027190656.GA5395@gmail.com> References: <20121027044145.GA13155@gmail.com> <20121027190656.GA5395@gmail.com> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, On Sun, Oct 28, 2012 at 12:36 AM, Kumar amit mehta wrote: > Thank you Srivatsa. It seems that lockdep framework is enabled on my running > kernel. > > > amit at ubuntu:/boot$ egrep -i "debug_kernel|lockdep" config-3.2.0-29-generic-pae > CONFIG_LOCKDEP_SUPPORT=y > CONFIG_DEBUG_KERNEL=y You'll need CONFIG_LOCKDEP=y as well. An easy way to configure lock debugging checks is to run 'make menuconfig' and enable the required options under the "Kernel hacking" section. Regards, Srivatsa S. Bhat > > > If above configuration is all that I need, then should I be seeing warning/error > messages in kernel logs(/var/log/kern.log) when there is inconsistency in > locking ? To test my hypothesis, I modified my simple kernel module to > deliberately induce locking error (After initializing read-write semaphore, I call > down_write() and do not free this semaphore lock by commenting out up_write() > invocation). But still I don't see any error or warning message trace in kernel > logs, I think, I'm missing something.