mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Merge branch 'linus' into locking/core, to fix up conflicts
Conflicts: mm/page_alloc.c Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
commit
edc2988c54
1536 changed files with 48802 additions and 53893 deletions
|
|
@ -258,7 +258,7 @@ int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
|
|||
esp_output_udp_encap(x, skb, esp);
|
||||
|
||||
if (!skb_cloned(skb)) {
|
||||
if (tailen <= skb_availroom(skb)) {
|
||||
if (tailen <= skb_tailroom(skb)) {
|
||||
nfrags = 1;
|
||||
trailer = skb;
|
||||
tail = skb_tail_pointer(trailer);
|
||||
|
|
@ -292,8 +292,6 @@ int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
|
|||
|
||||
kunmap_atomic(vaddr);
|
||||
|
||||
spin_unlock_bh(&x->lock);
|
||||
|
||||
nfrags = skb_shinfo(skb)->nr_frags;
|
||||
|
||||
__skb_fill_page_desc(skb, nfrags, page, pfrag->offset,
|
||||
|
|
@ -301,6 +299,9 @@ int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
|
|||
skb_shinfo(skb)->nr_frags = ++nfrags;
|
||||
|
||||
pfrag->offset = pfrag->offset + allocsize;
|
||||
|
||||
spin_unlock_bh(&x->lock);
|
||||
|
||||
nfrags++;
|
||||
|
||||
skb->len += tailen;
|
||||
|
|
@ -381,7 +382,7 @@ int esp_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
|
|||
(unsigned char *)esph - skb->data,
|
||||
assoclen + ivlen + esp->clen + alen);
|
||||
if (unlikely(err < 0))
|
||||
goto error;
|
||||
goto error_free;
|
||||
|
||||
if (!esp->inplace) {
|
||||
int allocsize;
|
||||
|
|
@ -392,7 +393,7 @@ int esp_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
|
|||
spin_lock_bh(&x->lock);
|
||||
if (unlikely(!skb_page_frag_refill(allocsize, pfrag, GFP_ATOMIC))) {
|
||||
spin_unlock_bh(&x->lock);
|
||||
goto error;
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
skb_shinfo(skb)->nr_frags = 1;
|
||||
|
|
@ -409,7 +410,7 @@ int esp_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
|
|||
(unsigned char *)esph - skb->data,
|
||||
assoclen + ivlen + esp->clen + alen);
|
||||
if (unlikely(err < 0))
|
||||
goto error;
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
if ((x->props.flags & XFRM_STATE_ESN))
|
||||
|
|
@ -442,8 +443,9 @@ int esp_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
|
|||
|
||||
if (sg != dsg)
|
||||
esp_ssg_unref(x, tmp);
|
||||
kfree(tmp);
|
||||
|
||||
error_free:
|
||||
kfree(tmp);
|
||||
error:
|
||||
return err;
|
||||
}
|
||||
|
|
@ -695,8 +697,10 @@ skip_cow:
|
|||
|
||||
sg_init_table(sg, nfrags);
|
||||
err = skb_to_sgvec(skb, sg, 0, skb->len);
|
||||
if (unlikely(err < 0))
|
||||
if (unlikely(err < 0)) {
|
||||
kfree(tmp);
|
||||
goto out;
|
||||
}
|
||||
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ static int esp_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_features_
|
|||
esp.seqno = cpu_to_be64(xo->seq.low + ((u64)xo->seq.hi << 32));
|
||||
|
||||
err = esp_output_tail(x, skb, &esp);
|
||||
if (err < 0)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
secpath_reset(skb);
|
||||
|
|
|
|||
|
|
@ -268,14 +268,14 @@ unsigned int arpt_do_table(struct sk_buff *skb,
|
|||
acpar.targinfo = t->data;
|
||||
verdict = t->u.kernel.target->target(skb, &acpar);
|
||||
|
||||
/* Target might have changed stuff. */
|
||||
arp = arp_hdr(skb);
|
||||
|
||||
if (verdict == XT_CONTINUE)
|
||||
if (verdict == XT_CONTINUE) {
|
||||
/* Target might have changed stuff. */
|
||||
arp = arp_hdr(skb);
|
||||
e = arpt_next_entry(e);
|
||||
else
|
||||
} else {
|
||||
/* Verdict */
|
||||
break;
|
||||
}
|
||||
} while (!acpar.hotdrop);
|
||||
xt_write_recseq_end(addend);
|
||||
local_bh_enable();
|
||||
|
|
|
|||
|
|
@ -352,13 +352,14 @@ ipt_do_table(struct sk_buff *skb,
|
|||
acpar.targinfo = t->data;
|
||||
|
||||
verdict = t->u.kernel.target->target(skb, &acpar);
|
||||
/* Target might have changed stuff. */
|
||||
ip = ip_hdr(skb);
|
||||
if (verdict == XT_CONTINUE)
|
||||
if (verdict == XT_CONTINUE) {
|
||||
/* Target might have changed stuff. */
|
||||
ip = ip_hdr(skb);
|
||||
e = ipt_next_entry(e);
|
||||
else
|
||||
} else {
|
||||
/* Verdict */
|
||||
break;
|
||||
}
|
||||
} while (!acpar.hotdrop);
|
||||
|
||||
xt_write_recseq_end(addend);
|
||||
|
|
|
|||
|
|
@ -117,7 +117,8 @@ clusterip_config_entry_put(struct net *net, struct clusterip_config *c)
|
|||
* functions are also incrementing the refcount on their own,
|
||||
* so it's safe to remove the entry even if it's in use. */
|
||||
#ifdef CONFIG_PROC_FS
|
||||
proc_remove(c->pde);
|
||||
if (cn->procdir)
|
||||
proc_remove(c->pde);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
|
@ -815,6 +816,7 @@ static void clusterip_net_exit(struct net *net)
|
|||
#ifdef CONFIG_PROC_FS
|
||||
struct clusterip_net *cn = net_generic(net, clusterip_net_id);
|
||||
proc_remove(cn->procdir);
|
||||
cn->procdir = NULL;
|
||||
#endif
|
||||
nf_unregister_net_hook(net, &cip_arp_ops);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2481,7 +2481,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
|
|||
name[val] = 0;
|
||||
|
||||
lock_sock(sk);
|
||||
err = tcp_set_congestion_control(sk, name, true);
|
||||
err = tcp_set_congestion_control(sk, name, true, true);
|
||||
release_sock(sk);
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,8 +189,8 @@ void tcp_init_congestion_control(struct sock *sk)
|
|||
INET_ECN_dontxmit(sk);
|
||||
}
|
||||
|
||||
void tcp_reinit_congestion_control(struct sock *sk,
|
||||
const struct tcp_congestion_ops *ca)
|
||||
static void tcp_reinit_congestion_control(struct sock *sk,
|
||||
const struct tcp_congestion_ops *ca)
|
||||
{
|
||||
struct inet_connection_sock *icsk = inet_csk(sk);
|
||||
|
||||
|
|
@ -338,7 +338,7 @@ out:
|
|||
* tcp_reinit_congestion_control (if the current congestion control was
|
||||
* already initialized.
|
||||
*/
|
||||
int tcp_set_congestion_control(struct sock *sk, const char *name, bool load)
|
||||
int tcp_set_congestion_control(struct sock *sk, const char *name, bool load, bool reinit)
|
||||
{
|
||||
struct inet_connection_sock *icsk = inet_csk(sk);
|
||||
const struct tcp_congestion_ops *ca;
|
||||
|
|
@ -360,9 +360,18 @@ int tcp_set_congestion_control(struct sock *sk, const char *name, bool load)
|
|||
if (!ca) {
|
||||
err = -ENOENT;
|
||||
} else if (!load) {
|
||||
icsk->icsk_ca_ops = ca;
|
||||
if (!try_module_get(ca->owner))
|
||||
const struct tcp_congestion_ops *old_ca = icsk->icsk_ca_ops;
|
||||
|
||||
if (try_module_get(ca->owner)) {
|
||||
if (reinit) {
|
||||
tcp_reinit_congestion_control(sk, ca);
|
||||
} else {
|
||||
icsk->icsk_ca_ops = ca;
|
||||
module_put(old_ca->owner);
|
||||
}
|
||||
} else {
|
||||
err = -EBUSY;
|
||||
}
|
||||
} else if (!((ca->flags & TCP_CONG_NON_RESTRICTED) ||
|
||||
ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))) {
|
||||
err = -EPERM;
|
||||
|
|
|
|||
|
|
@ -1176,7 +1176,7 @@ static void udp_set_dev_scratch(struct sk_buff *skb)
|
|||
scratch->csum_unnecessary = !!skb_csum_unnecessary(skb);
|
||||
scratch->is_linear = !skb_is_nonlinear(skb);
|
||||
#endif
|
||||
if (likely(!skb->_skb_refdst))
|
||||
if (likely(!skb->_skb_refdst && !skb_sec_path(skb)))
|
||||
scratch->_tsize_state |= UDP_SKB_IS_STATELESS;
|
||||
}
|
||||
|
||||
|
|
@ -1928,14 +1928,16 @@ drop:
|
|||
/* For TCP sockets, sk_rx_dst is protected by socket lock
|
||||
* For UDP, we use xchg() to guard against concurrent changes.
|
||||
*/
|
||||
void udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst)
|
||||
bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst)
|
||||
{
|
||||
struct dst_entry *old;
|
||||
|
||||
if (dst_hold_safe(dst)) {
|
||||
old = xchg(&sk->sk_rx_dst, dst);
|
||||
dst_release(old);
|
||||
return old != dst;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
EXPORT_SYMBOL(udp_sk_rx_dst_set);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue