Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions subsys/net/ip/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,14 @@ int net_tcp_queue_data(struct net_context *context, struct net_pkt *pkt)
*/
static int net_tcp_queue_pkt(struct net_context *context, struct net_pkt *pkt)
{
unsigned int key;

/* slist is not thread-safe, can be interrupted by retry timer and
* accessed concurrently, protect against that.
*/
key = irq_lock();
sys_slist_append(&context->tcp->sent_list, &pkt->sent_list);
irq_unlock(key);

/* We need to restart retry_timer if it is stopped. */
if (k_delayed_work_remaining_get(&context->tcp->retry_timer) == 0) {
Expand Down