Page MenuHomeFreeBSD

Set the console sc if it's not already set.

Authored by jhibbits on Jun 15 2018, 9:17 PM.



If the console_sc is not set (NULL), when interrupts are enabled uart_opal_cngetc() will try to dereference a NULL console_sc pointer, and fault.

Diff Detail

rS FreeBSD src repository
Lint OK
No Unit Test Coverage
Build Status
Buildable 17317
Build 17152: arc lint + arc unit

Event Timeline

jhibbits created this revision.Jun 15 2018, 9:17 PM
nwhitehorn requested changes to this revision.Jun 21 2018, 4:56 AM
nwhitehorn added inline comments.

Isn't it explicitly not the console now if console_sc is NULL?


This seems like a bad idea if there are multiple OPAL serial ports.

This revision now requires changes to proceed.Jun 21 2018, 4:56 AM
jhibbits abandoned this revision.Jun 21 2018, 1:53 PM

This approach is wrong. The problem I was trying to solve is the interrupt handler accessing a bad sc. The proper fix will be to instead make the interrupt handler use a sc, instead of a consdev, and move more state data into the sc.