Commit 6874d725 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[IPV4]: Fix endless loop in fn_hash_delete.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6d3c52b4
...@@ -609,6 +609,7 @@ fn_hash_delete(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta, ...@@ -609,6 +609,7 @@ fn_hash_delete(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
struct fn_hash *table = (struct fn_hash*)tb->tb_data; struct fn_hash *table = (struct fn_hash*)tb->tb_data;
struct fib_node *f; struct fib_node *f;
struct fib_alias *fa, *fa_to_delete; struct fib_alias *fa, *fa_to_delete;
struct list_head *fa_head;
int z = r->rtm_dst_len; int z = r->rtm_dst_len;
struct fn_zone *fz; struct fn_zone *fz;
u32 key; u32 key;
...@@ -634,7 +635,8 @@ fn_hash_delete(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta, ...@@ -634,7 +635,8 @@ fn_hash_delete(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
return -ESRCH; return -ESRCH;
fa_to_delete = NULL; fa_to_delete = NULL;
list_for_each_entry(fa, fa->fa_list.prev, fa_list) { fa_head = fa->fa_list.prev;
list_for_each_entry(fa, fa_head, fa_list) {
struct fib_info *fi = fa->fa_info; struct fib_info *fi = fa->fa_info;
if ((!r->rtm_type || if ((!r->rtm_type ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment