diff options
| author | Greg Kroah-Hartman <[email protected]> | 2016-05-09 09:34:49 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-05-09 09:34:49 +0200 |
| commit | 725d0123dfff3d7b666cf57f5d29c50addfc99d3 (patch) | |
| tree | 12ec63b2c3965033f30185b4b2f5f12039a9a242 /kernel/bpf/inode.c | |
| parent | 8cd1f9d01cbf4f46eace90d9792e65a209c37d31 (diff) | |
| parent | 44549e8f5eea4e0a41b487b63e616cb089922b99 (diff) | |
Merge 4.6-rc7 into char-misc-testing
This resolves a merge issue with drivers/hv/ring_buffer.c
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 f2ece3c174a5..8f94ca1860cf 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); @@ -297,7 +297,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; |