Page MenuHomeFreeBSD

Fix kernel panic with disabled ttys
ClosedPublic

Authored by emaste on Feb 26 2024, 3:49 PM.
Tags
None
Referenced Files
F102673679: D44086.diff
Fri, Nov 15, 4:41 PM
F102612340: D44086.diff
Thu, Nov 14, 7:20 PM
Unknown Object (File)
Thu, Nov 14, 3:35 AM
Unknown Object (File)
Wed, Nov 13, 10:43 PM
Unknown Object (File)
Wed, Nov 13, 10:41 PM
Unknown Object (File)
Thu, Nov 7, 10:10 PM
Unknown Object (File)
Sun, Nov 3, 11:32 AM
Unknown Object (File)
Sun, Nov 3, 11:22 AM
Subscribers

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

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.