Re: newbie: writing custom target, need help with getting it to work

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

 



On Sunday 2010-08-08 22:20, Yossi Weihs wrote:

>I?m seeing dev:TAPPY, which I think means the user space library correctly
>parsed the parameters. Since I manually inserted the module, I know it?s
>there, although I did not see the module initialization kernel info
>message... Any ideas on where to look next? I have attached my target code.

>#include "compat_xtables.h"
>#include "seabatch.h"
>#include "xt_TAP.h"
>
>static unsigned int
>tap_tg4(struct sk_buff **pskb, const struct xt_target_param *par)
>{
...
>	// Time to grab mutex
>	if (down_interruptible(private_info->tap_filter[fidx].lock)) {

Your tap makes for water damage. You must not sleep in Xtables kernel
code, that is, anythiing higher of a class than a spinlock_bh
is a no-no.

>		printk(KERN_CRIT "TAP down_interruptible %s %d\n",__FILE__,__LINE__);
>		return XT_CONTINUE;
>	}
>
>	// snip some code removed
>	
>	// Fall out
>	fallout:
>	// Release Mutex
>	up(private_info->tap_filter[fidx].lock);
>	// done
>	return XT_CONTINUE;
>}
>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux