Commit 639a28a6 authored by Robert Olsson's avatar Robert Olsson Committed by David S. Miller

[IPV4]: In rt_intern_hash, reinit all state vars on branch to "restart".

parent f201a3f5
...@@ -739,13 +739,19 @@ static inline int compare_keys(struct flowi *fl1, struct flowi *fl2) ...@@ -739,13 +739,19 @@ static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp) static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp)
{ {
struct rtable *rth, **rthp; struct rtable *rth, **rthp;
unsigned long now = jiffies; unsigned long now;
struct rtable *cand = NULL, **candp = NULL; struct rtable *cand, **candp;
u32 min_score = ~(u32)0; u32 min_score;
int chain_length = 0; int chain_length;
int attempts = !in_softirq(); int attempts = !in_softirq();
restart: restart:
chain_length = 0;
min_score = ~(u32)0;
cand = NULL;
candp = NULL;
now = jiffies;
rthp = &rt_hash_table[hash].chain; rthp = &rt_hash_table[hash].chain;
spin_lock_bh(&rt_hash_table[hash].lock); spin_lock_bh(&rt_hash_table[hash].lock);
......
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