Page MenuHomeFreeBSD

Fix kernel panic with disabled ttys
ClosedPublic

Authored by emaste on Feb 26 2024, 3:49 PM.
Tags
None
Referenced Files
F96373962: D44086.diff
Tue, Sep 24, 6:21 PM
F96315675: D44086.id135012.diff
Tue, Sep 24, 1:18 PM
F96288403: D44086.id135013.diff
Tue, Sep 24, 8:58 AM
F96281564: D44086.diff
Tue, Sep 24, 8:24 AM
Unknown Object (File)
Fri, Sep 20, 12:54 AM
Unknown Object (File)
Thu, Sep 19, 1:41 PM
Unknown Object (File)
Thu, Sep 19, 6:08 AM
Unknown Object (File)
Wed, Sep 18, 6:29 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.