mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Overlapping changes all over. The mini-qdisc bits were a little bit tricky, however. Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
commit
c02b3741eb
196 changed files with 2886 additions and 641 deletions
|
|
@ -517,7 +517,7 @@ int xfrm_trans_queue(struct sk_buff *skb,
|
|||
return -ENOBUFS;
|
||||
|
||||
XFRM_TRANS_SKB_CB(skb)->finish = finish;
|
||||
skb_queue_tail(&trans->queue, skb);
|
||||
__skb_queue_tail(&trans->queue, skb);
|
||||
tasklet_schedule(&trans->tasklet);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -609,7 +609,8 @@ static void xfrm_hash_rebuild(struct work_struct *work)
|
|||
|
||||
/* re-insert all policies by order of creation */
|
||||
list_for_each_entry_reverse(policy, &net->xfrm.policy_all, walk.all) {
|
||||
if (xfrm_policy_id2dir(policy->index) >= XFRM_POLICY_MAX) {
|
||||
if (policy->walk.dead ||
|
||||
xfrm_policy_id2dir(policy->index) >= XFRM_POLICY_MAX) {
|
||||
/* skip socket policies */
|
||||
continue;
|
||||
}
|
||||
|
|
@ -974,8 +975,6 @@ int xfrm_policy_flush(struct net *net, u8 type, bool task_valid)
|
|||
}
|
||||
if (!cnt)
|
||||
err = -ESRCH;
|
||||
else
|
||||
xfrm_policy_cache_flush();
|
||||
out:
|
||||
spin_unlock_bh(&net->xfrm.xfrm_policy_lock);
|
||||
return err;
|
||||
|
|
@ -1744,6 +1743,8 @@ void xfrm_policy_cache_flush(void)
|
|||
bool found = 0;
|
||||
int cpu;
|
||||
|
||||
might_sleep();
|
||||
|
||||
local_bh_disable();
|
||||
rcu_read_lock();
|
||||
for_each_possible_cpu(cpu) {
|
||||
|
|
@ -2064,8 +2065,11 @@ xfrm_bundle_lookup(struct net *net, const struct flowi *fl, u16 family, u8 dir,
|
|||
if (num_xfrms <= 0)
|
||||
goto make_dummy_bundle;
|
||||
|
||||
local_bh_disable();
|
||||
xdst = xfrm_resolve_and_create_bundle(pols, num_pols, fl, family,
|
||||
xflo->dst_orig);
|
||||
xflo->dst_orig);
|
||||
local_bh_enable();
|
||||
|
||||
if (IS_ERR(xdst)) {
|
||||
err = PTR_ERR(xdst);
|
||||
if (err != -EAGAIN)
|
||||
|
|
@ -2152,9 +2156,12 @@ struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig,
|
|||
goto no_transform;
|
||||
}
|
||||
|
||||
local_bh_disable();
|
||||
xdst = xfrm_resolve_and_create_bundle(
|
||||
pols, num_pols, fl,
|
||||
family, dst_orig);
|
||||
local_bh_enable();
|
||||
|
||||
if (IS_ERR(xdst)) {
|
||||
xfrm_pols_put(pols, num_pols);
|
||||
err = PTR_ERR(xdst);
|
||||
|
|
|
|||
|
|
@ -313,13 +313,14 @@ retry:
|
|||
if ((type && !try_module_get(type->owner)))
|
||||
type = NULL;
|
||||
|
||||
rcu_read_unlock();
|
||||
|
||||
if (!type && try_load) {
|
||||
request_module("xfrm-offload-%d-%d", family, proto);
|
||||
try_load = 0;
|
||||
goto retry;
|
||||
}
|
||||
|
||||
rcu_read_unlock();
|
||||
return type;
|
||||
}
|
||||
|
||||
|
|
@ -1534,8 +1535,12 @@ out:
|
|||
err = -EINVAL;
|
||||
spin_lock_bh(&x1->lock);
|
||||
if (likely(x1->km.state == XFRM_STATE_VALID)) {
|
||||
if (x->encap && x1->encap)
|
||||
if (x->encap && x1->encap &&
|
||||
x->encap->encap_type == x1->encap->encap_type)
|
||||
memcpy(x1->encap, x->encap, sizeof(*x1->encap));
|
||||
else if (x->encap || x1->encap)
|
||||
goto fail;
|
||||
|
||||
if (x->coaddr && x1->coaddr) {
|
||||
memcpy(x1->coaddr, x->coaddr, sizeof(*x1->coaddr));
|
||||
}
|
||||
|
|
@ -1552,6 +1557,8 @@ out:
|
|||
x->km.state = XFRM_STATE_DEAD;
|
||||
__xfrm_state_put(x);
|
||||
}
|
||||
|
||||
fail:
|
||||
spin_unlock_bh(&x1->lock);
|
||||
|
||||
xfrm_state_put(x1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue