net/uip: Avoid deadlock in uip_tcp_socket_free()
The function uip_tcp_socket_free() is called with the sk lock held, but
then goes on to call uip_tcp_socket_close() which attempts to aquire the
lock a second time, triggering a deadlock if there are outstanding TCP
connections.
Rename the existing uip_tcp_socket_close() to a _locked variety and
removing the locking from it. Add a new uip_tcp_socket_close() which
takes the lock and calls the _locked variety.
Fixes: d87b503f4d6e ("net/uip: Add exit function")
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
1 file changed