Unverified Commit 6dd76248 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5200 [sync] PR-5178: net: nfc: llcp: Add lock when modifying device list

parents 14e4c50e 6e9f3732
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1641,7 +1641,9 @@ int nfc_llcp_register_device(struct nfc_dev *ndev)
	timer_setup(&local->sdreq_timer, nfc_llcp_sdreq_timer, 0);
	INIT_WORK(&local->sdreq_timeout_work, nfc_llcp_sdreq_timeout_work);

	spin_lock(&llcp_devices_lock);
	list_add(&local->list, &llcp_devices);
	spin_unlock(&llcp_devices_lock);

	return 0;
}