Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-07-2014, 11:32 PM   #1
LQ Newbie
Registered: Jul 2010
Distribution: Ubuntu, CentOS
Posts: 27

Rep: Reputation: 4
kernel init & cleanup module: can i use locks?

Hi Gurus,

I am writing kernel module and i am allocating memory using kmalloc in init and in cleanup i use kfree.
my query:
1) can i use semaphore lock in init around kmalloc
2) can i use spinlock in cleanup around kfree?
3) locks are not required in init and cleanup functions?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cleanup Module Fa773N_M0nK Programming 7 01-11-2013 09:50 AM
[SOLVED] Difference between Static Kernel Module & Dynamic Kernel Module ram619 Linux - Newbie 2 12-11-2012 06:27 AM
kernel 3.0.4 upgrade and module-init-tools hippy jonny Slackware 3 09-09-2011 07:35 AM
no init, kernel-module version mismatch bat_boy11112233 Linux - General 3 10-03-2004 11:10 AM
2.6.1 kernel module-init-tools problem's digitalmonkey Linux - General 1 01-12-2004 12:52 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration