projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8811249
)
perf_event_get(): don't bother with fget_raw()
author
Al Viro
<viro@zeniv.linux.org.uk>
Thu, 27 Jun 2019 00:43:53 +0000
(20:43 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Thu, 27 Jun 2019 00:43:53 +0000
(20:43 -0400)
... since we immediately follow that with check that it *is* an
opened perf file, with O_PATH ones ending with with the same
-EBADF we'd get for descriptor that isn't opened at all.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kernel/events/core.c
patch
|
blob
|
history
diff --git
a/kernel/events/core.c
b/kernel/events/core.c
index abbd4b3b96c2a2a1a75dde8b1640b0b286e7c344..f9ff04c8d084955420ed25ea2be616e33bd91606 100644
(file)
--- a/
kernel/events/core.c
+++ b/
kernel/events/core.c
@@
-11554,9
+11554,7
@@
void perf_event_delayed_put(struct task_struct *task)
struct file *perf_event_get(unsigned int fd)
{
- struct file *file;
-
- file = fget_raw(fd);
+ struct file *file = fget(fd);
if (!file)
return ERR_PTR(-EBADF);