]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.20.10/fix-oops-er-added-to-netlink-fib.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.20.10 / fix-oops-er-added-to-netlink-fib.patch
1 From davem@davemloft.net Fri Apr 27 02:18:34 2007
2 From: Sergey Vlasov <vsu@altlinux.ru>
3 Date: Fri, 27 Apr 2007 02:18:35 -0700 (PDT)
4 Subject: IPV4: Fix OOPS'er added to netlink fib.
5 To: greg@kroah.com
6 Message-ID: <20070427.021835.115909046.davem@davemloft.net>
7
8 From: Sergey Vlasov <vsu@altlinux.ru>
9
10 [IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)
11
12 When CONFIG_IP_MULTIPLE_TABLES is enabled, the code in nl_fib_lookup()
13 needs to initialize the res.r field before fib_res_put(&res) - unlike
14 fib_lookup(), a direct call to ->tb_lookup does not set this field.
15
16 Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
17 Signed-off-by: David S. Miller <davem@davemloft.net>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19
20 ---
21 net/ipv4/fib_frontend.c | 4 ++++
22 1 file changed, 4 insertions(+)
23
24 --- a/net/ipv4/fib_frontend.c
25 +++ b/net/ipv4/fib_frontend.c
26 @@ -773,6 +773,10 @@ static void nl_fib_lookup(struct fib_res
27 .tos = frn->fl_tos,
28 .scope = frn->fl_scope } } };
29
30 +#ifdef CONFIG_IP_MULTIPLE_TABLES
31 + res.r = NULL;
32 +#endif
33 +
34 frn->err = -ENOENT;
35 if (tb) {
36 local_bh_disable();