In last setsid/tty locking changes...
In last setsid/tty locking changes:
kernel/exit.c +2 -0
@@ -332,7 +332,9 @@exit_mm (current);set_special_pids (1 ,1 ); +down (&tty_sem); current->signal->tty =NULL ; +up (&tty_sem);/* Block and flush all signals */ sigfillset (&blocked);
Sorry for the silly question, but why is needed a semaphore to write just one value without read/write nothing else?
Bye
Marco
Quoted 10 lines · Marco Cipullo
In last setsid/tty locking changes:
kernel/exit.c +2
-0+down (&tty_sem); current->signal->tty =NULL ; +up (&tty_sem);/* Block and flush all signals */ sigfillset (&blocked);Sorry for the silly question, but why is needed a semaphore to write just one value without read/write nothing else?
Look at the tty init_dev code paths and it might make more sense. It doesn't just say "protect this write" more importantly it says "don't do this in parallel with tty setup"