fib_add_vrf
Status: Beta
Brought to you by:
jleu
int
fib_add_vrf (unsigned char vrf)
{
struct fib_rule *df_rule;
struct fib_rule *main_rule;
struct fib_rule *loc_rule;
if (fib_rules[vrf])
return -EEXIST;
if (vrf)
write_lock_bh (&fib_rules_lock[vrf]);
df_rule = kmalloc (sizeof (struct fib_rule), GFP_KERNEL);
main_rule = kmalloc (sizeof (struct fib_rule),
GFP_KERNEL);
loc_rule = kmalloc (sizeof (struct fib_rule),
GFP_KERNEL);
......
}
write_lock_bh will make in_interrupt true.
so sometimes use kmalloc(,GFP_KERNEL) will cause BUG.
so i think move it out of write_lock_bh.