aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r--net/xfrm/xfrm_policy.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index ad8cc7bcf065..ed38d5d81f9e 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -320,10 +320,8 @@ static void xfrm_queue_purge(struct sk_buff_head *list)
320{ 320{
321 struct sk_buff *skb; 321 struct sk_buff *skb;
322 322
323 while ((skb = skb_dequeue(list)) != NULL) { 323 while ((skb = skb_dequeue(list)) != NULL)
324 dev_put(skb->dev);
325 kfree_skb(skb); 324 kfree_skb(skb);
326 }
327} 325}
328 326
329/* Rule must be locked. Release descentant resources, announce 327/* Rule must be locked. Release descentant resources, announce
@@ -1764,7 +1762,6 @@ static void xfrm_policy_queue_process(unsigned long arg)
1764 struct sk_buff *skb; 1762 struct sk_buff *skb;
1765 struct sock *sk; 1763 struct sock *sk;
1766 struct dst_entry *dst; 1764 struct dst_entry *dst;
1767 struct net_device *dev;
1768 struct xfrm_policy *pol = (struct xfrm_policy *)arg; 1765 struct xfrm_policy *pol = (struct xfrm_policy *)arg;
1769 struct xfrm_policy_queue *pq = &pol->polq; 1766 struct xfrm_policy_queue *pq = &pol->polq;
1770 struct flowi fl; 1767 struct flowi fl;
@@ -1811,7 +1808,6 @@ static void xfrm_policy_queue_process(unsigned long arg)
1811 dst = xfrm_lookup(xp_net(pol), skb_dst(skb)->path, 1808 dst = xfrm_lookup(xp_net(pol), skb_dst(skb)->path,
1812 &fl, skb->sk, 0); 1809 &fl, skb->sk, 0);
1813 if (IS_ERR(dst)) { 1810 if (IS_ERR(dst)) {
1814 dev_put(skb->dev);
1815 kfree_skb(skb); 1811 kfree_skb(skb);
1816 continue; 1812 continue;
1817 } 1813 }
@@ -1820,9 +1816,7 @@ static void xfrm_policy_queue_process(unsigned long arg)
1820 skb_dst_drop(skb); 1816 skb_dst_drop(skb);
1821 skb_dst_set(skb, dst); 1817 skb_dst_set(skb, dst);
1822 1818
1823 dev = skb->dev;
1824 err = dst_output(skb); 1819 err = dst_output(skb);
1825 dev_put(dev);
1826 } 1820 }
1827 1821
1828 return; 1822 return;
@@ -1845,7 +1839,6 @@ static int xdst_queue_output(struct sk_buff *skb)
1845 } 1839 }
1846 1840
1847 skb_dst_force(skb); 1841 skb_dst_force(skb);
1848 dev_hold(skb->dev);
1849 1842
1850 spin_lock_bh(&pq->hold_queue.lock); 1843 spin_lock_bh(&pq->hold_queue.lock);
1851 1844