release net when pneigh_lookup fails
PATCH 1/1 release net when pneigh_lookup fails
When the neighbour table constructor fails, the network namespace is not released. This patch fix that.
--- net/core/neighbour.c | 1 + 1 file changed, 1 insertion(+)
net/core/neighbour.c +1 -0
@@ -497,6 +497,7 @@ struct pneigh_entry * pneigh_lookup(struif (tbl->pconstructor && tbl->pconstructor (n)) {if (dev)dev_put (dev); +release_net (n->net);kfree (n); n =NULL ; goto out;
A message that is not in the archive (sent off-list or not yet received): 47272C3B.5080601-NmTC/[email protected]
Quoted 13 lines · Daniel Lezcano
Index:
linux-2.6-netns/net/core/neighbour.c
===================================================================net/core/neighbour.c +1
-0@@ -497,6 +497,7 @@ struct pneigh_entry * pneigh_lookup(struif (tbl->pconstructor && tbl->pconstructor (n)) {if (dev)dev_put (dev); +release_net (n->net);kfree (n); n =NULL ; goto out;
Quoted 1 line
_______________________________________________
Looks like there are some tabs vs. spaces issues in there. You should probably just make your line match the ones around it.
-- Dave
Quoted 17 lines · Dave Hansen
Quoted 12 lines · Daniel Lezcano
Index:
linux-2.6-netns/net/core/neighbour.c
===================================================================net/core/neighbour.c +1
-0@@ -497,6 +497,7 @@ struct pneigh_entry * pneigh_lookup(struif (tbl->pconstructor && tbl->pconstructor (n)) {if (dev)dev_put (dev); +release_net (n->net);kfree (n); n =NULL ; goto out;Quoted 1 line
_______________________________________________
Looks like there are some tabs vs. spaces issues in there. You should probably just make your line match the ones around it.
Thanks Dave for pointing that. I stupidly did a copy/paste from emacs to thunderbird. Grr ...
I will resend this patch with correct indentation. Benjamin spotted this problem with the patches I sent to netdev@ too, they are already fixed.
Thansk again.