A deadlock vulnerability in the Linux kernel's mlx5e Ethernet driver related to E-Switch uplink unbind operations in switchdev mode with offloaded IPsec policies has been fixed. The issue caused deadlocks on the esw->mode_lock semaphore during unbinding and IPsec state flush operations. The fix refactors eswitch operation initiators to avoid race conditions and deadlocks by introducing a new locking mechanism that waits for ongoing operations to finish before proceeding. This also removes a problematic timeout that previously caused representor device leaks.