Commit ea7b9588 authored by Sergey Vlasov's avatar Sergey Vlasov Committed by Greg Kroah-Hartman

IPV4: Fix OOPS'er added to netlink fib.

[IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)

When CONFIG_IP_MULTIPLE_TABLES is enabled, the code in nl_fib_lookup()
needs to initialize the res.r field before fib_res_put(&res) - unlike
fib_lookup(), a direct call to ->tb_lookup does not set this field.
Signed-off-by: default avatarSergey Vlasov <vsu@altlinux.ru>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent de46c337
...@@ -777,6 +777,10 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb ) ...@@ -777,6 +777,10 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb )
.tos = frn->fl_tos, .tos = frn->fl_tos,
.scope = frn->fl_scope } } }; .scope = frn->fl_scope } } };
#ifdef CONFIG_IP_MULTIPLE_TABLES
res.r = NULL;
#endif
frn->err = -ENOENT; frn->err = -ENOENT;
if (tb) { if (tb) {
local_bh_disable(); local_bh_disable();
......
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