projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76d2d75
)
pidfd: remove unneeded NULL check from pidfd_prepare()
author
Christian Brauner
<brauner@kernel.org>
Thu, 3 Apr 2025 14:09:02 +0000
(16:09 +0200)
committer
Christian Brauner
<brauner@kernel.org>
Mon, 7 Apr 2025 07:38:24 +0000
(09:38 +0200)
None of the caller actually pass a NULL pid in there.
Link:
https://lore.kernel.org/r/20250403-work-pidfd-fixes-v1-2-a123b6ed6716@kernel.org
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
kernel/fork.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/fork.c
b/kernel/fork.c
index c4b26cd8998b8e7b2b516e0bb0b1d4676ff644dc..182ec2e9087d95329168636866fe7d7e2c417c95 100644
(file)
--- a/
kernel/fork.c
+++ b/
kernel/fork.c
@@
-2110,7
+2110,7
@@
int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
{
bool thread = flags & PIDFD_THREAD;
- if (!pid
|| !pid
_has_task(pid, thread ? PIDTYPE_PID : PIDTYPE_TGID))
+ if (!pid_has_task(pid, thread ? PIDTYPE_PID : PIDTYPE_TGID))
return -EINVAL;
return __pidfd_prepare(pid, flags, ret);