mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
rptun: add ns_match callback to resolve rptun deadlock
thread A: accept -> net_lock -> socket_rpmsg_accept
-> rpmsg_register_callabck -> rptun_lock
thread B: ns_bind -> rpmsg_socket_ns_bind -> get_tx_payload_buffer
-> rptun_wait_tx -> usrsock_rpmsg_ept_cb -> usrsockdev_write
-> net_lock -> deadlock
fix:
add ns_match callback
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
@@ -258,7 +258,7 @@ static int uinput_rpmsg_initialize(FAR struct uinput_context_s *ctx,
|
||||
list_initialize(&ctx->eptlist);
|
||||
strlcpy(ctx->name, name, UINPUT_NAME_SIZE);
|
||||
return rpmsg_register_callback(ctx, uinput_rpmsg_device_created,
|
||||
uinput_rpmsg_device_destroy, NULL);
|
||||
uinput_rpmsg_device_destroy, NULL, NULL);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user