linux/drivers/tty
Oleg Nesterov 5ffd2c37cb kill do_each_thread()
Eric has pointed out that we still have 3 users of do_each_thread().
Change them to use for_each_process_thread() and kill this helper.

There is a subtle change, after do_each_thread/while_each_thread g == t ==
&init_task, while after for_each_process_thread() they both point to
nowhere, but this doesn't matter.

> Why is for_each_process_thread() better than do_each_thread()?

Say, for_each_process_thread() is rcu safe, do_each_thread() is not.

And certainly

	for_each_process_thread(p, t) {
		do_something(p, t);
	}

looks better than

	do_each_thread(p, t) {
		do_something(p, t);
	} while_each_thread(p, t);

And again, there are only 3 users of this awkward helper left.  It should
have been killed years ago and in fact I thought it had already been
killed.  It uses while_each_thread() which needs some changes.

Link: https://lkml.kernel.org/r/20230817163708.GA8248@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: "Christian Brauner (Microsoft)" <brauner@kernel.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jiri Slaby <jirislaby@kernel.org> # tty/serial
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-21 13:46:25 -07:00
..
hvc xen: branch for v6.3-rc4 2023-03-24 09:44:43 -07:00
ipwireless
serdev serdev: Add method to assert break signal over tty UART port 2023-04-23 21:51:25 -07:00
serial drm/i915: Move abs_diff() to math.h 2023-08-18 10:18:59 -07:00
vt vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF 2023-05-13 20:01:13 +09:00
amiserial.c tty: Convert hw_stopped in tty_struct to bool 2023-03-17 15:01:09 +01:00
ehv_bytechan.c tty: evh_bytechan: Replace NO_IRQ by 0 2022-11-02 08:10:42 +01:00
goldfish.c tty: goldfish: Fix free_irq() on remove 2022-06-10 13:31:31 +02:00
Kconfig Char/Misc drivers for 6.4-rc1 2023-04-27 12:07:50 -07:00
Makefile
mips_ejtag_fdc.c serial: Convert SERIAL_XMIT_SIZE to UART_XMIT_SIZE 2022-06-27 14:41:31 +02:00
moxa.c tty: moxa: Rename dtr/rts parameters/variables to active 2023-01-19 16:04:35 +01:00
mxser.c tty: Convert hw_stopped in tty_struct to bool 2023-03-17 15:01:09 +01:00
n_gsm.c tty: n_gsm: fix UAF in gsm_cleanup_mux 2023-07-25 19:07:25 +02:00
n_hdlc.c tty: n_hdlc: remove HDLC_MAGIC 2022-09-22 16:12:34 +02:00
n_null.c
n_tty.c tty: fix hang on tty device with no_room set 2023-06-15 12:21:11 +02:00
nozomi.c
pty.c tty: make tty_class a static const structure 2023-04-03 21:43:07 +02:00
rpmsg_tty.c
synclink_gt.c tty: synclink_gt: don't allocate and pass dummy flags 2023-04-20 13:32:53 +02:00
sysrq.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
tty_audit.c tty_audit: make data of tty_audit_log() const 2023-06-21 17:57:29 +02:00
tty_baudrate.c tty: Fix comment style in tty_termios_input_baud_rate() 2022-08-30 14:22:34 +02:00
tty_buffer.c tty: Convert tty_buffer flags to bool 2022-11-09 13:02:16 +01:00
tty_io.c kill do_each_thread() 2023-08-21 13:46:25 -07:00
tty_ioctl.c tty: Prevent writing chars during tcsetattr TCSADRAIN/FLUSH 2023-03-29 10:55:53 +02:00
tty_jobctrl.c signal: Replace __group_send_sig_info with send_signal_locked 2022-05-11 14:33:17 -05:00
tty_ldisc.c tty: tty_ldisc: Remove the ret variable 2023-03-09 17:11:18 +01:00
tty_ldsem.c
tty_mutex.c tty: remove TTY_MAGIC 2022-09-22 16:12:34 +02:00
tty_port.c tty: Convert ->dtr_rts() to take bool argument 2023-01-19 16:04:35 +01:00
tty.h tty_audit: make tty pointers in exposed functions const 2023-06-21 17:57:29 +02:00
ttynull.c
vcc.c termios: start unifying non-UAPI parts of asm/termios.h 2022-09-09 10:44:34 +02:00