aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/pktgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r--net/core/pktgen.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index b7f2d65a614f..5f043d346694 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -1667,13 +1667,12 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
1667 struct in_device *in_dev; 1667 struct in_device *in_dev;
1668 1668
1669 rcu_read_lock(); 1669 rcu_read_lock();
1670 in_dev = __in_dev_get(pkt_dev->odev); 1670 in_dev = __in_dev_get_rcu(pkt_dev->odev);
1671 if (in_dev) { 1671 if (in_dev) {
1672 if (in_dev->ifa_list) { 1672 if (in_dev->ifa_list) {
1673 pkt_dev->saddr_min = in_dev->ifa_list->ifa_address; 1673 pkt_dev->saddr_min = in_dev->ifa_list->ifa_address;
1674 pkt_dev->saddr_max = pkt_dev->saddr_min; 1674 pkt_dev->saddr_max = pkt_dev->saddr_min;
1675 } 1675 }
1676 __in_dev_put(in_dev);
1677 } 1676 }
1678 rcu_read_unlock(); 1677 rcu_read_unlock();
1679 } 1678 }