Page MenuHomeFreeBSD

Fix kernel panic with disabled ttys
ClosedPublic

Authored by emaste on Feb 26 2024, 3:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 2:37 AM
Unknown Object (File)
Sat, Nov 23, 4:37 AM
Unknown Object (File)
Tue, Nov 19, 7:19 AM
Unknown Object (File)
Nov 15 2024, 4:41 PM
Unknown Object (File)
Nov 14 2024, 7:20 PM
Unknown Object (File)
Nov 14 2024, 3:35 AM
Unknown Object (File)
Nov 13 2024, 10:43 PM
Unknown Object (File)
Nov 13 2024, 10:41 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste updated this revision to Diff 135013.
emaste created this revision.

use bool while here

Just a note, this is still racy.

This revision is now accepted and ready to land.Feb 26 2024, 3:57 PM

Just a note, this is still racy.

I originally had just (p = tp->t_session->s_leader) != NULL but then copied the example from tty_signal_sessleader. To make sure I understand correctly there's not a unique problem with my use but rather this pattern in general?

Just a note, this is still racy.

I originally had just (p = tp->t_session->s_leader) != NULL but then copied the example from tty_signal_sessleader. To make sure I understand correctly there's not a unique problem with my use but rather this pattern in general?

The session is not locked, so leader might be changed under us. It should not cause kernel memory corruption, since struct proc is type-stable, but in principle results in accessing tp after the test result is potentially invalid outright or invalidated after the check.

This revision now requires review to proceed.Feb 26 2024, 4:11 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 26 2024, 8:14 PM
This revision was automatically updated to reflect the committed changes.