X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=kernel%2Fsignal.c;h=c4da1ef56fdfcd7a522e403600c9786efc26bd94;hb=964f9cfaaee31588b1f1a23edee8bed94136452a;hp=534fec266a334b299846034e878c271619fe5c71;hpb=979d859d3ff130ff212472d7fc67a474cdd96047;p=linux.git diff --git a/kernel/signal.c b/kernel/signal.c index 534fec266a33..c4da1ef56fdf 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -3678,8 +3678,11 @@ static int copy_siginfo_from_user_any(kernel_siginfo_t *kinfo, siginfo_t *info) static struct pid *pidfd_to_pid(const struct file *file) { - if (file->f_op == &pidfd_fops) - return file->private_data; + struct pid *pid; + + pid = pidfd_pid(file); + if (!IS_ERR(pid)) + return pid; return tgid_pidfd_to_pid(file); }