Help to schedule nf_register_hook

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

 



Hi,

I want to schedule the registration of a hook. I tried using kernel's struct timer_list, but I've been having problems with that. I thought that maybe you are not supposed to call nf_register_hook from within a function that's been registered in a kernel timer (wonder if it has to do with being or not being in the userspace). I'd like some help on that.

I'll give an example of what I'm trying to do:

void foo () { 
        unsigned long parameter;
        ...
        DEFINE_TIMER( timer, secfoo, jiffies + 250, parameter);
        ...
        add_timer(timer);
}

void secfoo( unsigned long param ) {
        ...
        nf_register_hook(...);
        ...
}

If I comment the "add_timer(timer);", and put this line instead:

secfoo( parameter );

It works out as I intended. But if I do it like it is written, I get a kernel panic.

I realize this may be simple, or maybe foolish, but I've been wanting to solve this problem for a while. If this panic was not supposed to happen, then I'll try to give all the information possible about the problem.        

Thanks in advance,

Bruno Fiss



      Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux