sonic-linux-kernel
sonic-linux-kernel copied to clipboard
Fix os crash caused by optoe when class switch
Why: When the device is initially set to optoe2, there is an option ->client [1]. If echo 3>dev_class is manually set at this time, as for optoe3, option ->client [1] is meaningless but the content is still the address data of optoe2, accessing an illegal address will occur, causing the device to crash.
How: Set option->client[1] to NULL when unregistering device
Closes:https://github.com/sonic-net/sonic-linux-kernel/issues/412