Commit f182c8ff authored by David Emett's avatar David Emett Committed by Yi Yang
Browse files

tty: fix read of tty->pgrp outside of ctrl_lock

mainline inclusion
from mainline-v5.2-rc1
commit cf90c06f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9IPML
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cf90c06f8115016fa4a94644a26a4ba093f0055e



--------------------------------

The intention was clearly to use the tty_pgrp local variable rather than
re-read tty->pgrp outside of ctrl_lock, so do that.

This bug was introduced by commit 2812d9e9 ("tty: Combine
SIGTTOU/SIGTTIN handling").

Signed-off-by: default avatarDavid Emett <dave@sp4m.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYi Yang <yiyang13@huawei.com>
parent e9eac2f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment