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)
Sun, Nov 3, 11:32 AM
Unknown Object (File)
Sun, Nov 3, 11:22 AM
Unknown Object (File)
Tue, Oct 15, 11:21 PM
Unknown Object (File)
Tue, Oct 15, 2:01 PM
Unknown Object (File)
Mon, Oct 14, 4:49 PM
Unknown Object (File)
Fri, Oct 11, 12:13 PM
Unknown Object (File)
Thu, Oct 10, 2:35 PM
Unknown Object (File)
Tue, Oct 8, 12:37 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.