Author: brooks Date: Mon Mar 12 23:04:42 2018 New Revision: 330821 URL: https://svnweb.freebsd.org/changeset/base/330821
Log: Use the stack for temporary storage in OTIOCCONS. The old code used the thread's pcb via the uap->data pointer. Reviewed by: ed Approved by: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14674 Modified: head/sys/kern/tty_compat.c Modified: head/sys/kern/tty_compat.c ============================================================================== --- head/sys/kern/tty_compat.c Mon Mar 12 23:02:01 2018 (r330820) +++ head/sys/kern/tty_compat.c Mon Mar 12 23:04:42 2018 (r330821) @@ -262,9 +262,11 @@ tty_ioctl_compat(struct tty *tp, u_long com, caddr_t d fflag, td)); } - case OTIOCCONS: - *(int *)data = 1; - return (tty_ioctl(tp, TIOCCONS, data, fflag, td)); + case OTIOCCONS: { + int one = 1; + + return (tty_ioctl(tp, TIOCCONS, (caddr_t)&one, fflag, td)); + } default: return (ENOIOCTL); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"