Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Lots of conflicts, by happily all cases of overlapping changes, parallel adds, things of that nature. Thanks to Stephen Rothwell, Saeed Mahameed, and others for their guidance in these resolutions. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -315,6 +315,12 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
|
||||
|
||||
sp->xvec[sp->len++] = x;
|
||||
|
||||
skb_dst_force(skb);
|
||||
if (!skb_dst(skb)) {
|
||||
XFRM_INC_STATS(net, LINUX_MIB_XFRMINERROR);
|
||||
goto drop;
|
||||
}
|
||||
|
||||
lock:
|
||||
spin_lock(&x->lock);
|
||||
|
||||
@@ -354,7 +360,6 @@ lock:
|
||||
XFRM_SKB_CB(skb)->seq.input.low = seq;
|
||||
XFRM_SKB_CB(skb)->seq.input.hi = seq_hi;
|
||||
|
||||
skb_dst_force(skb);
|
||||
dev_hold(skb->dev);
|
||||
|
||||
if (crypto_done)
|
||||
|
@@ -102,6 +102,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
|
||||
skb_dst_force(skb);
|
||||
if (!skb_dst(skb)) {
|
||||
XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTERROR);
|
||||
err = -EHOSTUNREACH;
|
||||
goto error_nolock;
|
||||
}
|
||||
|
||||
|
@@ -426,6 +426,12 @@ static void xfrm_put_mode(struct xfrm_mode *mode)
|
||||
module_put(mode->owner);
|
||||
}
|
||||
|
||||
void xfrm_state_free(struct xfrm_state *x)
|
||||
{
|
||||
kmem_cache_free(xfrm_state_cache, x);
|
||||
}
|
||||
EXPORT_SYMBOL(xfrm_state_free);
|
||||
|
||||
static void xfrm_state_gc_destroy(struct xfrm_state *x)
|
||||
{
|
||||
tasklet_hrtimer_cancel(&x->mtimer);
|
||||
@@ -452,7 +458,7 @@ static void xfrm_state_gc_destroy(struct xfrm_state *x)
|
||||
}
|
||||
xfrm_dev_state_free(x);
|
||||
security_xfrm_state_free(x);
|
||||
kmem_cache_free(xfrm_state_cache, x);
|
||||
xfrm_state_free(x);
|
||||
}
|
||||
|
||||
static void xfrm_state_gc_task(struct work_struct *work)
|
||||
@@ -788,7 +794,7 @@ void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si)
|
||||
{
|
||||
spin_lock_bh(&net->xfrm.xfrm_state_lock);
|
||||
si->sadcnt = net->xfrm.state_num;
|
||||
si->sadhcnt = net->xfrm.state_hmask;
|
||||
si->sadhcnt = net->xfrm.state_hmask + 1;
|
||||
si->sadhmcnt = xfrm_state_hashmax;
|
||||
spin_unlock_bh(&net->xfrm.xfrm_state_lock);
|
||||
}
|
||||
|
@@ -2288,13 +2288,13 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
|
||||
}
|
||||
|
||||
kfree(x);
|
||||
xfrm_state_free(x);
|
||||
kfree(xp);
|
||||
|
||||
return 0;
|
||||
|
||||
free_state:
|
||||
kfree(x);
|
||||
xfrm_state_free(x);
|
||||
nomem:
|
||||
return err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user