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