Re: [PATCH v2] serial: core: fix NULL pointer dereference in serial_core_unregister_port()

From: Tony Lindgren

Date: Fri Aug 28 2026 - 03:17:24 EST


On Wed, Aug 26, 2026 at 10:46:54AM +0200, Ruslan Valiyev wrote:
> Return early when there is no port device, and read port->port_dev
> under port_mutex.
>
> Also clear port->port_dev on the serial_core_register_port() error
> path, where the port device has already been removed.

These look like valid fixes to me:

Reviewed-by: Tony Lindgren <tony.lindgren@xxxxxxxxxxxxxxx>