Skip to content
Commit c2f65cdd authored by Jean-Nicolas Graux's avatar Jean-Nicolas Graux Committed by Anas Nashif
Browse files

net: gptp: fix race condition on timestamp callback



If time aware system has more than 1 gptp port, because there is only
one boolean to handle callback registering, a race condition can occur
for instance in case 2 master ports are waiting for a timestamp following
sending of sync message. More in details, callback may be unregistered
by port 1 while port 2 is waiting for timestamp event.

The issue is solved by declaring as much as boolean and struct
net_if_timestamp_cb as the number of declared ports
(=CONFIG_NET_GPTP_NUM_PORTS).

Signed-off-by: default avatarJean-Nicolas Graux <jean-nicolas.graux@st.com>
parent 64aa577c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment