From mboxrd@z Thu Jan 1 00:00:00 1970 From: gmate.amit@gmail.com (Kumar amit mehta) Date: Tue, 6 Nov 2012 01:30:11 -0800 Subject: Tools for checking incorrect usage of locking techniques in k-space In-Reply-To: References: <20121027044145.GA13155@gmail.com> <20121027190656.GA5395@gmail.com> <20121030054109.GA3440@gmail.com> Message-ID: <20121106093011.GB15600@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mon, Nov 05, 2012 at 09:51:19AM +0400, Vladimir Murzin wrote: > I've not tried your module, but I suppose that you should get warning > as soon as you try to take write semaphore once again. > Thank you for your mail. I wanted to try what you've suggested, but now I'm facing a different problem. For kernel-janitorial purpose I sync my local repo to the linux-next tree almost everyday and once in a while I build and boot from the latest kernel from the linux-next tree. But most of the time, After syncing to the latest linux-next tree, I perform only following steps to build some staging drivers under linux-next tree: >>From the top of the latest linux-next tree: # make oldconfig # make prepare # make modules_prepare # make M=drivers/staging/ The above steps work fine, except that I get some warning message. WARNING: Symbol version dump /home/amit/lkernel/Module.symvers is missing; modules will have no dependencies and modversions. So my understanding is that I've booted from version-X and the linux-next kernel version is version-Y and because of this version mismatch, I see the above WARNING message. Now, because of this kernel version mismatch I am not able to insert the module. An attempt to do so returns following error message: root at ubuntu:/home/amit/ldd3/misc-modules/echo# insmod echo.ko insmod: error inserting 'echo.ko': -1 Invalid module format Some information regarding my setup: amit at ubuntu:~/ldd3/misc-modules/echo$ uname -r 3.7.0-rc3-next-20121029 amit at ubuntu:~/ldd3/misc-modules/echo$ ll /lib/modules/`uname -r`/build lrwxrwxrwx 1 root root 18 Oct 29 22:02 /lib/modules/3.7.0-rc3-next-20121029/build -> /home/amit/lkernel/ Here the /lib/modules/3.7.0-rc3-next-20121029/build is a softlink to the latest kernel sources. If I try to install the header files for my current kernel(returned by 'uname -r'), I get following error message: amit at ubuntu:~$ sudo apt-get install linux-headers-$(uname -r) Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux-headers-3.7.0-rc3-next-20121029 E: Couldn't find any package by regex 'linux-headers-3.7.0-rc3-next-20121029' How do I ovecome this ? Do I need to build the latest kernel(linux-next) and boot from it, whenever I sync my local linux-next repository with the remote? I'd like to be able to check my local changes by building and loading the module/subsystem. -Amit