Unverified Commit 0ff07578 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4137 sctp: fix potential deadlock on &net->sctp.addr_wq_lock

parents fb3a7131 3f469030
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -380,9 +380,9 @@ static void sctp_auto_asconf_init(struct sctp_sock *sp)
	struct net *net = sock_net(&sp->inet.sk);

	if (net->sctp.default_auto_asconf) {
		spin_lock(&net->sctp.addr_wq_lock);
		spin_lock_bh(&net->sctp.addr_wq_lock);
		list_add_tail(&sp->auto_asconf_list, &net->sctp.auto_asconf_splist);
		spin_unlock(&net->sctp.addr_wq_lock);
		spin_unlock_bh(&net->sctp.addr_wq_lock);
		sp->do_auto_asconf = 1;
	}
}