Sorry, it's not dead loop, I realized it but I tried to send to mail to note it on my phone, it failed.
> -----Original Message----- > From: Cong Wang [mailto:xiyou.wangc...@gmail.com] > Sent: Thursday, June 22, 2017 6:54 AM > To: yuan linyu > Cc: Linux Kernel Network Developers; David S . Miller; YUAN Linyu > Subject: Re: [PATCH] net: fib: fix fib_new_table() logical issue > > On Wed, Jun 21, 2017 at 7:02 AM, yuan linyu <cug...@163.com> wrote: > > From: yuan linyu <linyu.y...@alcatel-sbell.com.cn> > > > > when CONFIG_IP_MULTIPLE_TABLES defined, > > if id == RT_TABLE_LOCAL and !net->ipv4.fib_has_custom_rules, > > fib_new_table() call itself to get RT_TABLE_MAIN table, > > but if RT_TABLE_MAIN table not exist at this point, > > this function will become deadloop. > > Why deadloop here? If fib_new_table() is called recursively, > then main table is created by fib_trie_table() and we return.