summaryrefslogtreecommitdiff
path: root/Kernel/TTY/TTY.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-04-02 21:57:12 +0200
committerAndreas Kling <kling@serenityos.org>2023-04-04 10:33:42 +0200
commit83b409083b661ea1b326c3ea9b49f1f38842202e (patch)
tree2ef66fd2fa2eb05a83f981137a24c63a5f34d700 /Kernel/TTY/TTY.cpp
parented1253ab900cf8aec5dc57fb4d5311f22cc5ce9f (diff)
downloadserenity-83b409083b661ea1b326c3ea9b49f1f38842202e.zip
Kernel: Stop using *LockRefPtr for ProcessGroup
Had to wrap Process::m_pg in a SpinlockProtected for this to be safe.
Diffstat (limited to 'Kernel/TTY/TTY.cpp')
-rw-r--r--Kernel/TTY/TTY.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp
index 77da82f96e..90882d0f82 100644
--- a/Kernel/TTY/TTY.cpp
+++ b/Kernel/TTY/TTY.cpp
@@ -500,7 +500,7 @@ ErrorOr<void> TTY::ioctl(OpenFileDescription&, unsigned request, Userspace<void*
return EPERM;
if (process && pgid != process->pgid())
return EPERM;
- m_pg = process_group;
+ m_pg = TRY(process_group->try_make_weak_ptr());
if (process) {
if (auto parent = Process::from_pid_ignoring_jails(process->ppid())) {