locking between netfilter hook and kernel thread

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

 



hi, 

i'm having some troubles to avoid race conditions between a netfilter
function (in PRE_ROUTING hook) and a kernel thread. both share (for read
and write) data structures created by the netfilter function, and only
removed by the kernel thread.

i've read "Unreliable Guide To Locking" and have the following
questions:

* what's the context in which run netfilter hooks? (maybe softirq?)
* my development scenario is a UP with preempt enable, but the
production scenario would be a SMP with preempt (that matters?)
* what's the condition i don't know, thats 'freezes' the system?

with spin_lock/unlock i'm getting total 'freeze' in some of the stress
tests i run... what kind of locking i need to use instead?

thanks in advance,

toni

-- 
toni <agar9938@xxxxxxxxxxxxxxxxxx>


--
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