aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/bpf_trace.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-20 11:25:44 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-20 11:25:44 -0400
commitaf52739b922f656eb1f39016fabaabe4baeda2e2 (patch)
tree79a7aa810d0493cd0cf4adebac26d37f12e8b545 /kernel/trace/bpf_trace.c
parent25ed6a5e97809129a1bc852b6b5c7d03baa112c4 (diff)
parent33688abb2802ff3a230bd2441f765477b94cc89e (diff)
Merge 4.7-rc4 into staging-next
We want the fixes in here, and we can resolve a merge issue in drivers/iio/industrialio-trigger.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/trace/bpf_trace.c')
-rw-r--r--kernel/trace/bpf_trace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 780bcbe1d4de..720b7bb01d43 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -198,7 +198,7 @@ static u64 bpf_perf_event_read(u64 r1, u64 index, u64 r3, u64 r4, u64 r5)
198 if (unlikely(index >= array->map.max_entries)) 198 if (unlikely(index >= array->map.max_entries))
199 return -E2BIG; 199 return -E2BIG;
200 200
201 file = (struct file *)array->ptrs[index]; 201 file = READ_ONCE(array->ptrs[index]);
202 if (unlikely(!file)) 202 if (unlikely(!file))
203 return -ENOENT; 203 return -ENOENT;
204 204
@@ -247,7 +247,7 @@ static u64 bpf_perf_event_output(u64 r1, u64 r2, u64 flags, u64 r4, u64 size)
247 if (unlikely(index >= array->map.max_entries)) 247 if (unlikely(index >= array->map.max_entries))
248 return -E2BIG; 248 return -E2BIG;
249 249
250 file = (struct file *)array->ptrs[index]; 250 file = READ_ONCE(array->ptrs[index]);
251 if (unlikely(!file)) 251 if (unlikely(!file))
252 return -ENOENT; 252 return -ENOENT;
253 253