mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says:
====================
pull-request: bpf 2021-09-14
The following pull-request contains BPF updates for your *net* tree.
We've added 7 non-merge commits during the last 13 day(s) which contain
a total of 18 files changed, 334 insertions(+), 193 deletions(-).
The main changes are:
1) Fix mmap_lock lockdep splat in BPF stack map's build_id lookup, from Yonghong Song.
2) Fix BPF cgroup v2 program bypass upon net_cls/prio activation, from Daniel Borkmann.
3) Fix kvcalloc() BTF line info splat on oversized allocation attempts, from Bixuan Cui.
4) Fix BPF selftest build of task_pt_regs test for arm64/s390, from Jean-Philippe Brucker.
5) Fix BPF's disasm.{c,h} to dual-license so that it is aligned with bpftool given the former
is a build dependency for the latter, from Daniel Borkmann with ACKs from contributors.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -71,11 +71,8 @@ static int update_classid_sock(const void *v, struct file *file, unsigned n)
|
||||
struct update_classid_context *ctx = (void *)v;
|
||||
struct socket *sock = sock_from_file(file);
|
||||
|
||||
if (sock) {
|
||||
spin_lock(&cgroup_sk_update_lock);
|
||||
if (sock)
|
||||
sock_cgroup_set_classid(&sock->sk->sk_cgrp_data, ctx->classid);
|
||||
spin_unlock(&cgroup_sk_update_lock);
|
||||
}
|
||||
if (--ctx->batch == 0) {
|
||||
ctx->batch = UPDATE_CLASSID_BATCH;
|
||||
return n + 1;
|
||||
@@ -121,8 +118,6 @@ static int write_classid(struct cgroup_subsys_state *css, struct cftype *cft,
|
||||
struct css_task_iter it;
|
||||
struct task_struct *p;
|
||||
|
||||
cgroup_sk_alloc_disable();
|
||||
|
||||
cs->classid = (u32)value;
|
||||
|
||||
css_task_iter_start(css, 0, &it);
|
||||
|
||||
@@ -207,8 +207,6 @@ static ssize_t write_priomap(struct kernfs_open_file *of,
|
||||
if (!dev)
|
||||
return -ENODEV;
|
||||
|
||||
cgroup_sk_alloc_disable();
|
||||
|
||||
rtnl_lock();
|
||||
|
||||
ret = netprio_set_prio(of_css(of), dev, prio);
|
||||
@@ -221,12 +219,10 @@ static ssize_t write_priomap(struct kernfs_open_file *of,
|
||||
static int update_netprio(const void *v, struct file *file, unsigned n)
|
||||
{
|
||||
struct socket *sock = sock_from_file(file);
|
||||
if (sock) {
|
||||
spin_lock(&cgroup_sk_update_lock);
|
||||
|
||||
if (sock)
|
||||
sock_cgroup_set_prioidx(&sock->sk->sk_cgrp_data,
|
||||
(unsigned long)v);
|
||||
spin_unlock(&cgroup_sk_update_lock);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -235,8 +231,6 @@ static void net_prio_attach(struct cgroup_taskset *tset)
|
||||
struct task_struct *p;
|
||||
struct cgroup_subsys_state *css;
|
||||
|
||||
cgroup_sk_alloc_disable();
|
||||
|
||||
cgroup_taskset_for_each(p, css, tset) {
|
||||
void *v = (void *)(unsigned long)css->id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user