diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-05-20 12:16:37 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-05-20 12:16:37 +0800 |
commit | 510d0a3f869611dcd001a2b7627fa5dded4579af (patch) | |
tree | ba06ce27af2f3aa194a268e3f26f0665c21357a9 /kernel/bpf/inode.c | |
parent | e37ddf27108a992e191b27df9bd532cb9157dc89 (diff) | |
parent | 544ec5b08d007f184ab97abdbed87e613c8c0b83 (diff) |
Merge tag 'v4.4.11' into linux-linaro-lsk-v4.4lsk-v4.4-16.05
This is the 4.4.11 stable release
Diffstat (limited to 'kernel/bpf/inode.c')
-rw-r--r-- | kernel/bpf/inode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index 5a8a797d50b7..d1a7646f79c5 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c @@ -31,10 +31,10 @@ static void *bpf_any_get(void *raw, enum bpf_type type) { switch (type) { case BPF_TYPE_PROG: - atomic_inc(&((struct bpf_prog *)raw)->aux->refcnt); + raw = bpf_prog_inc(raw); break; case BPF_TYPE_MAP: - bpf_map_inc(raw, true); + raw = bpf_map_inc(raw, true); break; default: WARN_ON_ONCE(1); @@ -277,7 +277,8 @@ static void *bpf_obj_do_get(const struct filename *pathname, goto out; raw = bpf_any_get(inode->i_private, *type); - touch_atime(&path); + if (!IS_ERR(raw)) + touch_atime(&path); path_put(&path); return raw; |