mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
net: Fix a memmove bug in dev_gro_receive()
net sched: fix some kernel memory leaks
netfilter: {ip,ip6,arp}_tables: avoid lockdep false positive
Revert "netlink: netlink_recvmsg() fix"
ipv6: remove sysctl jiffies conversion on gc_elasticity and min_adv_mss
xfrm: Use GFP_ATOMIC in xfrm_compile_policy
ath5k: disable ASPM L0s for all cards
ath9k_htc: load proper firmware for device ID 7015
wl1251: fix trigger scan timeout usage
ath9k_htc: Fix disconnect issue in HT40 mode.
ath9k_htc: fix panic on packet injection using airbase-ng tool.
ipw2100: register pm_qos request before registering pci driver
This commit is contained in:
commit
e14f64c207
22 changed files with 107 additions and 73 deletions
|
|
@ -3143,7 +3143,7 @@ pull:
|
|||
put_page(skb_shinfo(skb)->frags[0].page);
|
||||
memmove(skb_shinfo(skb)->frags,
|
||||
skb_shinfo(skb)->frags + 1,
|
||||
--skb_shinfo(skb)->nr_frags);
|
||||
--skb_shinfo(skb)->nr_frags * sizeof(skb_frag_t));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -735,6 +735,7 @@ static void get_counters(const struct xt_table_info *t,
|
|||
if (cpu == curcpu)
|
||||
continue;
|
||||
i = 0;
|
||||
local_bh_disable();
|
||||
xt_info_wrlock(cpu);
|
||||
xt_entry_foreach(iter, t->entries[cpu], t->size) {
|
||||
ADD_COUNTER(counters[i], iter->counters.bcnt,
|
||||
|
|
@ -742,6 +743,7 @@ static void get_counters(const struct xt_table_info *t,
|
|||
++i;
|
||||
}
|
||||
xt_info_wrunlock(cpu);
|
||||
local_bh_enable();
|
||||
}
|
||||
put_cpu();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -909,6 +909,7 @@ get_counters(const struct xt_table_info *t,
|
|||
if (cpu == curcpu)
|
||||
continue;
|
||||
i = 0;
|
||||
local_bh_disable();
|
||||
xt_info_wrlock(cpu);
|
||||
xt_entry_foreach(iter, t->entries[cpu], t->size) {
|
||||
ADD_COUNTER(counters[i], iter->counters.bcnt,
|
||||
|
|
@ -916,6 +917,7 @@ get_counters(const struct xt_table_info *t,
|
|||
++i; /* macro does multi eval of i */
|
||||
}
|
||||
xt_info_wrunlock(cpu);
|
||||
local_bh_enable();
|
||||
}
|
||||
put_cpu();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -922,6 +922,7 @@ get_counters(const struct xt_table_info *t,
|
|||
if (cpu == curcpu)
|
||||
continue;
|
||||
i = 0;
|
||||
local_bh_disable();
|
||||
xt_info_wrlock(cpu);
|
||||
xt_entry_foreach(iter, t->entries[cpu], t->size) {
|
||||
ADD_COUNTER(counters[i], iter->counters.bcnt,
|
||||
|
|
@ -929,6 +930,7 @@ get_counters(const struct xt_table_info *t,
|
|||
++i;
|
||||
}
|
||||
xt_info_wrunlock(cpu);
|
||||
local_bh_enable();
|
||||
}
|
||||
put_cpu();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2580,7 +2580,7 @@ ctl_table ipv6_route_table_template[] = {
|
|||
.data = &init_net.ipv6.sysctl.ip6_rt_gc_elasticity,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
{
|
||||
.procname = "mtu_expires",
|
||||
|
|
@ -2594,7 +2594,7 @@ ctl_table ipv6_route_table_template[] = {
|
|||
.data = &init_net.ipv6.sysctl.ip6_rt_min_advmss,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
{
|
||||
.procname = "gc_min_interval_ms",
|
||||
|
|
|
|||
|
|
@ -1406,7 +1406,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
|
|||
struct netlink_sock *nlk = nlk_sk(sk);
|
||||
int noblock = flags&MSG_DONTWAIT;
|
||||
size_t copied;
|
||||
struct sk_buff *skb;
|
||||
struct sk_buff *skb, *frag __maybe_unused = NULL;
|
||||
int err;
|
||||
|
||||
if (flags&MSG_OOB)
|
||||
|
|
@ -1441,21 +1441,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
|
|||
kfree_skb(skb);
|
||||
skb = compskb;
|
||||
} else {
|
||||
/*
|
||||
* Before setting frag_list to NULL, we must get a
|
||||
* private copy of skb if shared (because of MSG_PEEK)
|
||||
*/
|
||||
if (skb_shared(skb)) {
|
||||
struct sk_buff *nskb;
|
||||
|
||||
nskb = pskb_copy(skb, GFP_KERNEL);
|
||||
kfree_skb(skb);
|
||||
skb = nskb;
|
||||
err = -ENOMEM;
|
||||
if (!skb)
|
||||
goto out;
|
||||
}
|
||||
kfree_skb(skb_shinfo(skb)->frag_list);
|
||||
frag = skb_shinfo(skb)->frag_list;
|
||||
skb_shinfo(skb)->frag_list = NULL;
|
||||
}
|
||||
}
|
||||
|
|
@ -1492,6 +1478,10 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
|
|||
if (flags & MSG_TRUNC)
|
||||
copied = skb->len;
|
||||
|
||||
#ifdef CONFIG_COMPAT_NETLINK_MESSAGES
|
||||
skb_shinfo(skb)->frag_list = frag;
|
||||
#endif
|
||||
|
||||
skb_free_datagram(sk, skb);
|
||||
|
||||
if (nlk->cb && atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf / 2)
|
||||
|
|
|
|||
|
|
@ -152,21 +152,24 @@ static int tcf_gact(struct sk_buff *skb, struct tc_action *a, struct tcf_result
|
|||
static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
|
||||
{
|
||||
unsigned char *b = skb_tail_pointer(skb);
|
||||
struct tc_gact opt;
|
||||
struct tcf_gact *gact = a->priv;
|
||||
struct tc_gact opt = {
|
||||
.index = gact->tcf_index,
|
||||
.refcnt = gact->tcf_refcnt - ref,
|
||||
.bindcnt = gact->tcf_bindcnt - bind,
|
||||
.action = gact->tcf_action,
|
||||
};
|
||||
struct tcf_t t;
|
||||
|
||||
opt.index = gact->tcf_index;
|
||||
opt.refcnt = gact->tcf_refcnt - ref;
|
||||
opt.bindcnt = gact->tcf_bindcnt - bind;
|
||||
opt.action = gact->tcf_action;
|
||||
NLA_PUT(skb, TCA_GACT_PARMS, sizeof(opt), &opt);
|
||||
#ifdef CONFIG_GACT_PROB
|
||||
if (gact->tcfg_ptype) {
|
||||
struct tc_gact_p p_opt;
|
||||
p_opt.paction = gact->tcfg_paction;
|
||||
p_opt.pval = gact->tcfg_pval;
|
||||
p_opt.ptype = gact->tcfg_ptype;
|
||||
struct tc_gact_p p_opt = {
|
||||
.paction = gact->tcfg_paction,
|
||||
.pval = gact->tcfg_pval,
|
||||
.ptype = gact->tcfg_ptype,
|
||||
};
|
||||
|
||||
NLA_PUT(skb, TCA_GACT_PROB, sizeof(p_opt), &p_opt);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -219,15 +219,16 @@ static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, int bind, i
|
|||
{
|
||||
unsigned char *b = skb_tail_pointer(skb);
|
||||
struct tcf_mirred *m = a->priv;
|
||||
struct tc_mirred opt;
|
||||
struct tc_mirred opt = {
|
||||
.index = m->tcf_index,
|
||||
.action = m->tcf_action,
|
||||
.refcnt = m->tcf_refcnt - ref,
|
||||
.bindcnt = m->tcf_bindcnt - bind,
|
||||
.eaction = m->tcfm_eaction,
|
||||
.ifindex = m->tcfm_ifindex,
|
||||
};
|
||||
struct tcf_t t;
|
||||
|
||||
opt.index = m->tcf_index;
|
||||
opt.action = m->tcf_action;
|
||||
opt.refcnt = m->tcf_refcnt - ref;
|
||||
opt.bindcnt = m->tcf_bindcnt - bind;
|
||||
opt.eaction = m->tcfm_eaction;
|
||||
opt.ifindex = m->tcfm_ifindex;
|
||||
NLA_PUT(skb, TCA_MIRRED_PARMS, sizeof(opt), &opt);
|
||||
t.install = jiffies_to_clock_t(jiffies - m->tcf_tm.install);
|
||||
t.lastuse = jiffies_to_clock_t(jiffies - m->tcf_tm.lastuse);
|
||||
|
|
|
|||
|
|
@ -272,19 +272,19 @@ static int tcf_nat_dump(struct sk_buff *skb, struct tc_action *a,
|
|||
{
|
||||
unsigned char *b = skb_tail_pointer(skb);
|
||||
struct tcf_nat *p = a->priv;
|
||||
struct tc_nat opt;
|
||||
struct tc_nat opt = {
|
||||
.old_addr = p->old_addr,
|
||||
.new_addr = p->new_addr,
|
||||
.mask = p->mask,
|
||||
.flags = p->flags,
|
||||
|
||||
.index = p->tcf_index,
|
||||
.action = p->tcf_action,
|
||||
.refcnt = p->tcf_refcnt - ref,
|
||||
.bindcnt = p->tcf_bindcnt - bind,
|
||||
};
|
||||
struct tcf_t t;
|
||||
|
||||
opt.old_addr = p->old_addr;
|
||||
opt.new_addr = p->new_addr;
|
||||
opt.mask = p->mask;
|
||||
opt.flags = p->flags;
|
||||
|
||||
opt.index = p->tcf_index;
|
||||
opt.action = p->tcf_action;
|
||||
opt.refcnt = p->tcf_refcnt - ref;
|
||||
opt.bindcnt = p->tcf_bindcnt - bind;
|
||||
|
||||
NLA_PUT(skb, TCA_NAT_PARMS, sizeof(opt), &opt);
|
||||
t.install = jiffies_to_clock_t(jiffies - p->tcf_tm.install);
|
||||
t.lastuse = jiffies_to_clock_t(jiffies - p->tcf_tm.lastuse);
|
||||
|
|
|
|||
|
|
@ -164,13 +164,14 @@ static inline int tcf_simp_dump(struct sk_buff *skb, struct tc_action *a,
|
|||
{
|
||||
unsigned char *b = skb_tail_pointer(skb);
|
||||
struct tcf_defact *d = a->priv;
|
||||
struct tc_defact opt;
|
||||
struct tc_defact opt = {
|
||||
.index = d->tcf_index,
|
||||
.refcnt = d->tcf_refcnt - ref,
|
||||
.bindcnt = d->tcf_bindcnt - bind,
|
||||
.action = d->tcf_action,
|
||||
};
|
||||
struct tcf_t t;
|
||||
|
||||
opt.index = d->tcf_index;
|
||||
opt.refcnt = d->tcf_refcnt - ref;
|
||||
opt.bindcnt = d->tcf_bindcnt - bind;
|
||||
opt.action = d->tcf_action;
|
||||
NLA_PUT(skb, TCA_DEF_PARMS, sizeof(opt), &opt);
|
||||
NLA_PUT_STRING(skb, TCA_DEF_DATA, d->tcfd_defdata);
|
||||
t.install = jiffies_to_clock_t(jiffies - d->tcf_tm.install);
|
||||
|
|
|
|||
|
|
@ -159,13 +159,14 @@ static inline int tcf_skbedit_dump(struct sk_buff *skb, struct tc_action *a,
|
|||
{
|
||||
unsigned char *b = skb_tail_pointer(skb);
|
||||
struct tcf_skbedit *d = a->priv;
|
||||
struct tc_skbedit opt;
|
||||
struct tc_skbedit opt = {
|
||||
.index = d->tcf_index,
|
||||
.refcnt = d->tcf_refcnt - ref,
|
||||
.bindcnt = d->tcf_bindcnt - bind,
|
||||
.action = d->tcf_action,
|
||||
};
|
||||
struct tcf_t t;
|
||||
|
||||
opt.index = d->tcf_index;
|
||||
opt.refcnt = d->tcf_refcnt - ref;
|
||||
opt.bindcnt = d->tcf_bindcnt - bind;
|
||||
opt.action = d->tcf_action;
|
||||
NLA_PUT(skb, TCA_SKBEDIT_PARMS, sizeof(opt), &opt);
|
||||
if (d->flags & SKBEDIT_F_PRIORITY)
|
||||
NLA_PUT(skb, TCA_SKBEDIT_PRIORITY, sizeof(d->priority),
|
||||
|
|
|
|||
|
|
@ -2504,7 +2504,7 @@ static struct xfrm_policy *xfrm_compile_policy(struct sock *sk, int opt,
|
|||
if (p->dir > XFRM_POLICY_OUT)
|
||||
return NULL;
|
||||
|
||||
xp = xfrm_policy_alloc(net, GFP_KERNEL);
|
||||
xp = xfrm_policy_alloc(net, GFP_ATOMIC);
|
||||
if (xp == NULL) {
|
||||
*dir = -ENOBUFS;
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue