aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 1cfe0d199e7c..7b8eacd5ac26 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1957,22 +1957,22 @@ static void ip_handle_martian_source(struct net_device *dev,
1957#endif 1957#endif
1958} 1958}
1959 1959
1960/* called in rcu_read_lock() section */
1960static int __mkroute_input(struct sk_buff *skb, 1961static int __mkroute_input(struct sk_buff *skb,
1961 struct fib_result *res, 1962 struct fib_result *res,
1962 struct in_device *in_dev, 1963 struct in_device *in_dev,
1963 __be32 daddr, __be32 saddr, u32 tos, 1964 __be32 daddr, __be32 saddr, u32 tos,
1964 struct rtable **result) 1965 struct rtable **result)
1965{ 1966{
1966
1967 struct rtable *rth; 1967 struct rtable *rth;
1968 int err; 1968 int err;
1969 struct in_device *out_dev; 1969 struct in_device *out_dev;
1970 unsigned flags = 0; 1970 unsigned int flags = 0;
1971 __be32 spec_dst; 1971 __be32 spec_dst;
1972 u32 itag; 1972 u32 itag;
1973 1973
1974 /* get a working reference to the output device */ 1974 /* get a working reference to the output device */
1975 out_dev = in_dev_get(FIB_RES_DEV(*res)); 1975 out_dev = __in_dev_get_rcu(FIB_RES_DEV(*res));
1976 if (out_dev == NULL) { 1976 if (out_dev == NULL) {
1977 if (net_ratelimit()) 1977 if (net_ratelimit())
1978 printk(KERN_CRIT "Bug in ip_route_input" \ 1978 printk(KERN_CRIT "Bug in ip_route_input" \
@@ -2053,8 +2053,6 @@ static int __mkroute_input(struct sk_buff *skb,
2053 *result = rth; 2053 *result = rth;
2054 err = 0; 2054 err = 0;
2055 cleanup: 2055 cleanup:
2056 /* release the working reference to the output device */
2057 in_dev_put(out_dev);
2058 return err; 2056 return err;
2059} 2057}
2060 2058