mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
xfrm: Only compute net once in xfrm_policy_queue_process
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
850dcc4d4d
commit
3f5312ae62
1 changed files with 3 additions and 4 deletions
|
@ -1887,6 +1887,7 @@ static void xfrm_policy_queue_process(unsigned long arg)
|
||||||
struct sock *sk;
|
struct sock *sk;
|
||||||
struct dst_entry *dst;
|
struct dst_entry *dst;
|
||||||
struct xfrm_policy *pol = (struct xfrm_policy *)arg;
|
struct xfrm_policy *pol = (struct xfrm_policy *)arg;
|
||||||
|
struct net *net = xp_net(pol);
|
||||||
struct xfrm_policy_queue *pq = &pol->polq;
|
struct xfrm_policy_queue *pq = &pol->polq;
|
||||||
struct flowi fl;
|
struct flowi fl;
|
||||||
struct sk_buff_head list;
|
struct sk_buff_head list;
|
||||||
|
@ -1903,8 +1904,7 @@ static void xfrm_policy_queue_process(unsigned long arg)
|
||||||
spin_unlock(&pq->hold_queue.lock);
|
spin_unlock(&pq->hold_queue.lock);
|
||||||
|
|
||||||
dst_hold(dst->path);
|
dst_hold(dst->path);
|
||||||
dst = xfrm_lookup(xp_net(pol), dst->path, &fl,
|
dst = xfrm_lookup(net, dst->path, &fl, sk, 0);
|
||||||
sk, 0);
|
|
||||||
if (IS_ERR(dst))
|
if (IS_ERR(dst))
|
||||||
goto purge_queue;
|
goto purge_queue;
|
||||||
|
|
||||||
|
@ -1934,8 +1934,7 @@ static void xfrm_policy_queue_process(unsigned long arg)
|
||||||
|
|
||||||
xfrm_decode_session(skb, &fl, skb_dst(skb)->ops->family);
|
xfrm_decode_session(skb, &fl, skb_dst(skb)->ops->family);
|
||||||
dst_hold(skb_dst(skb)->path);
|
dst_hold(skb_dst(skb)->path);
|
||||||
dst = xfrm_lookup(xp_net(pol), skb_dst(skb)->path,
|
dst = xfrm_lookup(net, skb_dst(skb)->path, &fl, skb->sk, 0);
|
||||||
&fl, skb->sk, 0);
|
|
||||||
if (IS_ERR(dst)) {
|
if (IS_ERR(dst)) {
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue