Skip to content

Commit

Permalink
drivers/tty: Fixed regression in IRQ
Browse files Browse the repository at this point in the history
These 2 lines were removed by upstream but it was added back in this particular commit: 49eec58 . Without this fix there will be a memory leak which causes phone to freeze and reboot when su is called by userspace for any usage. This can also cause opening terminal emulators notably termux to freeze and reboot the phone.

Signed-off-by: Cyber Knight <[email protected]>
Signed-off-by: K A R T H I K <[email protected]>
  • Loading branch information
cyberknight777 authored and karthik558 committed Sep 15, 2021
1 parent dcb7577 commit cb15a8d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/tty/tty_jobctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,8 @@ static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t
if (session_of_pgrp(pgrp) != task_session(current))
goto out_unlock;
retval = 0;
spin_lock_irq(&real_tty->ctrl_lock);
put_pid(real_tty->pgrp);
real_tty->pgrp = get_pid(pgrp);
spin_unlock_irq(&real_tty->ctrl_lock);
out_unlock:
rcu_read_unlock();
out_unlock_ctrl:
Expand Down

0 comments on commit cb15a8d

Please sign in to comment.