Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor comment merge conflict in mlx5. Staging driver has a fixup due to the skb->xmit_more changes in 'net-next', but was removed in 'net'. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -281,7 +281,7 @@ struct sk_buff *__skb_try_recv_datagram(struct sock *sk, unsigned int flags,
|
||||
break;
|
||||
|
||||
sk_busy_loop(sk, flags & MSG_DONTWAIT);
|
||||
} while (!skb_queue_empty(&sk->sk_receive_queue));
|
||||
} while (sk->sk_receive_queue.prev != *last);
|
||||
|
||||
error = -EAGAIN;
|
||||
|
||||
|
@@ -5017,8 +5017,10 @@ static inline void __netif_receive_skb_list_ptype(struct list_head *head,
|
||||
if (pt_prev->list_func != NULL)
|
||||
pt_prev->list_func(head, pt_prev, orig_dev);
|
||||
else
|
||||
list_for_each_entry_safe(skb, next, head, list)
|
||||
list_for_each_entry_safe(skb, next, head, list) {
|
||||
skb_list_del_init(skb);
|
||||
pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
|
||||
}
|
||||
}
|
||||
|
||||
static void __netif_receive_skb_list_core(struct list_head *head, bool pfmemalloc)
|
||||
|
@@ -1798,11 +1798,16 @@ static int ethtool_get_strings(struct net_device *dev, void __user *useraddr)
|
||||
WARN_ON_ONCE(!ret);
|
||||
|
||||
gstrings.len = ret;
|
||||
data = vzalloc(array_size(gstrings.len, ETH_GSTRING_LEN));
|
||||
if (gstrings.len && !data)
|
||||
return -ENOMEM;
|
||||
|
||||
__ethtool_get_strings(dev, gstrings.string_set, data);
|
||||
if (gstrings.len) {
|
||||
data = vzalloc(array_size(gstrings.len, ETH_GSTRING_LEN));
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
|
||||
__ethtool_get_strings(dev, gstrings.string_set, data);
|
||||
} else {
|
||||
data = NULL;
|
||||
}
|
||||
|
||||
ret = -EFAULT;
|
||||
if (copy_to_user(useraddr, &gstrings, sizeof(gstrings)))
|
||||
@@ -1898,11 +1903,15 @@ static int ethtool_get_stats(struct net_device *dev, void __user *useraddr)
|
||||
return -EFAULT;
|
||||
|
||||
stats.n_stats = n_stats;
|
||||
data = vzalloc(array_size(n_stats, sizeof(u64)));
|
||||
if (n_stats && !data)
|
||||
return -ENOMEM;
|
||||
|
||||
ops->get_ethtool_stats(dev, &stats, data);
|
||||
if (n_stats) {
|
||||
data = vzalloc(array_size(n_stats, sizeof(u64)));
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
ops->get_ethtool_stats(dev, &stats, data);
|
||||
} else {
|
||||
data = NULL;
|
||||
}
|
||||
|
||||
ret = -EFAULT;
|
||||
if (copy_to_user(useraddr, &stats, sizeof(stats)))
|
||||
@@ -1942,16 +1951,21 @@ static int ethtool_get_phy_stats(struct net_device *dev, void __user *useraddr)
|
||||
return -EFAULT;
|
||||
|
||||
stats.n_stats = n_stats;
|
||||
data = vzalloc(array_size(n_stats, sizeof(u64)));
|
||||
if (n_stats && !data)
|
||||
return -ENOMEM;
|
||||
|
||||
if (dev->phydev && !ops->get_ethtool_phy_stats) {
|
||||
ret = phy_ethtool_get_stats(dev->phydev, &stats, data);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (n_stats) {
|
||||
data = vzalloc(array_size(n_stats, sizeof(u64)));
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
|
||||
if (dev->phydev && !ops->get_ethtool_phy_stats) {
|
||||
ret = phy_ethtool_get_stats(dev->phydev, &stats, data);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
} else {
|
||||
ops->get_ethtool_phy_stats(dev, &stats, data);
|
||||
}
|
||||
} else {
|
||||
ops->get_ethtool_phy_stats(dev, &stats, data);
|
||||
data = NULL;
|
||||
}
|
||||
|
||||
ret = -EFAULT;
|
||||
|
@@ -6862,14 +6862,8 @@ static bool flow_dissector_is_valid_access(int off, int size,
|
||||
const struct bpf_prog *prog,
|
||||
struct bpf_insn_access_aux *info)
|
||||
{
|
||||
if (type == BPF_WRITE) {
|
||||
switch (off) {
|
||||
case bpf_ctx_range_till(struct __sk_buff, cb[0], cb[4]):
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (type == BPF_WRITE)
|
||||
return false;
|
||||
|
||||
switch (off) {
|
||||
case bpf_ctx_range(struct __sk_buff, data):
|
||||
@@ -6881,11 +6875,7 @@ static bool flow_dissector_is_valid_access(int off, int size,
|
||||
case bpf_ctx_range_ptr(struct __sk_buff, flow_keys):
|
||||
info->reg_type = PTR_TO_FLOW_KEYS;
|
||||
break;
|
||||
case bpf_ctx_range(struct __sk_buff, tc_classid):
|
||||
case bpf_ctx_range(struct __sk_buff, data_meta):
|
||||
case bpf_ctx_range_till(struct __sk_buff, family, local_port):
|
||||
case bpf_ctx_range(struct __sk_buff, tstamp):
|
||||
case bpf_ctx_range(struct __sk_buff, wire_len):
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -707,6 +707,7 @@ bool __skb_flow_bpf_dissect(struct bpf_prog *prog,
|
||||
/* Pass parameters to the BPF program */
|
||||
memset(flow_keys, 0, sizeof(*flow_keys));
|
||||
cb->qdisc_cb.flow_keys = flow_keys;
|
||||
flow_keys->n_proto = skb->protocol;
|
||||
flow_keys->nhoff = skb_network_offset(skb);
|
||||
flow_keys->thoff = flow_keys->nhoff;
|
||||
|
||||
@@ -716,7 +717,8 @@ bool __skb_flow_bpf_dissect(struct bpf_prog *prog,
|
||||
/* Restore state */
|
||||
memcpy(cb, &cb_saved, sizeof(cb_saved));
|
||||
|
||||
flow_keys->nhoff = clamp_t(u16, flow_keys->nhoff, 0, skb->len);
|
||||
flow_keys->nhoff = clamp_t(u16, flow_keys->nhoff,
|
||||
skb_network_offset(skb), skb->len);
|
||||
flow_keys->thoff = clamp_t(u16, flow_keys->thoff,
|
||||
flow_keys->nhoff, skb->len);
|
||||
|
||||
|
@@ -304,6 +304,7 @@ static __net_init int setup_net(struct net *net, struct user_namespace *user_ns)
|
||||
|
||||
refcount_set(&net->count, 1);
|
||||
refcount_set(&net->passive, 1);
|
||||
get_random_bytes(&net->hash_mix, sizeof(u32));
|
||||
net->dev_base_seq = 1;
|
||||
net->user_ns = user_ns;
|
||||
idr_init(&net->netns_ids);
|
||||
|
@@ -3800,7 +3800,7 @@ int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb)
|
||||
unsigned int delta_truesize;
|
||||
struct sk_buff *lp;
|
||||
|
||||
if (unlikely(p->len + len >= 65536))
|
||||
if (unlikely(p->len + len >= 65536 || NAPI_GRO_CB(skb)->flush))
|
||||
return -E2BIG;
|
||||
|
||||
lp = NAPI_GRO_CB(p)->last;
|
||||
|
Reference in New Issue
Block a user