Critical sections between tasklets and other kernel code

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

 



I am designing a device driver for linux kernel 2.4.

When an interrupt occurs, the ISR schedules a tasklet for further processing. I
have some data that is accessed from both, ioctl and the tasklet. Do I need to
protect this data using critical section?

If user calls ioctl, execution switches to kernel mode. If ioctl is modifying
the common data structure when an interrupt occurs, can the tasklet (scheduled
by ISR) run before execution gets back to ioctl? If this is possible then will
putting the tasklet on scheduler queue avoid such scenario?

I read the book "Linux Device Drivers" but was not able to figure out the
possible "safe times" when the tasklet will be executed.

Thanks for your time,
Sripal

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux