-
Notifications
You must be signed in to change notification settings - Fork 752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data race between parseBpfData() and LinkDeserialize() #633
Comments
tklauser
added a commit
to tklauser/netlink
that referenced
this issue
Apr 12, 2021
The package level var native (holding the native endianness) is initialized at package load time. Thus there is no need to re-initalize it in (*Handle).filterModify, parseU32Data, parseFwData, parseBpfData and parseMatchAllData. This fixes a data race between these functions and any read access of var native, e.g. in LinkDeserialize as reported in issue vishvananda#633. Fixes vishvananda#633 Signed-off-by: Tobias Klauser <[email protected]>
tklauser
added a commit
to tklauser/netlink
that referenced
this issue
Apr 12, 2021
The package level var native (holding the native endianness) is initialized at package load time. Thus there is no need to re-initalize it in (*Handle).filterModify, parseU32Data, parseFwData, parseBpfData and parseMatchAllData. This fixes a data race between these functions and any read access of var native, e.g. in LinkDeserialize as reported in issue vishvananda#633. Fixes vishvananda#633 Signed-off-by: Tobias Klauser <[email protected]>
tklauser
added a commit
to tklauser/netlink
that referenced
this issue
Apr 12, 2021
The package level var native (holding the native endianness) is initialized at package load time. Thus there is no need to re-initalize it in functions using it, e.g. (*Handle).filterModify, parseU32Data, parseFwData, parseBpfData and parseMatchAllData. This fixes a data race between these functions and any read access of var native, e.g. in LinkDeserialize as reported in issue vishvananda#633. Fixes vishvananda#633 Signed-off-by: Tobias Klauser <[email protected]>
tklauser
added a commit
to tklauser/netlink
that referenced
this issue
May 8, 2021
The package level var native (holding the native endianness) is initialized at package load time. Thus there is no need to re-initalize it in functions using it, e.g. (*Handle).filterModify, parseU32Data, parseFwData, parseBpfData and parseMatchAllData. This fixes a data race between these functions and any read access of var native, e.g. in LinkDeserialize as reported in issue vishvananda#633. Fixes vishvananda#633 Signed-off-by: Tobias Klauser <[email protected]>
tklauser
added a commit
to tklauser/netlink
that referenced
this issue
May 10, 2021
The package level var native (holding the native endianness) is initialized at package load time. Thus there is no need to re-initalize it in functions using it, e.g. (*Handle).filterModify, parseU32Data, parseFwData, parseBpfData and parseMatchAllData. This fixes a data race between these functions and any read access of var native, e.g. in LinkDeserialize as reported in issue vishvananda#633. Also don't re-declare local variables shadowing the global package-level var. Fixes vishvananda#633 Signed-off-by: Tobias Klauser <[email protected]>
tklauser
added a commit
to tklauser/netlink
that referenced
this issue
May 10, 2021
The package level var native (holding the native endianness) is initialized at package load time. Thus there is no need to re-initalize it in functions using it, e.g. (*Handle).filterModify, parseU32Data, parseFwData, parseBpfData and parseMatchAllData. This fixes a data race between these functions and any read access of var native, e.g. in LinkDeserialize as reported in issue vishvananda#633. Also don't re-declare local variables shadowing the global package-level var. Fixes vishvananda#633 Signed-off-by: Tobias Klauser <[email protected]>
aboch
pushed a commit
that referenced
this issue
May 10, 2021
The package level var native (holding the native endianness) is initialized at package load time. Thus there is no need to re-initalize it in functions using it, e.g. (*Handle).filterModify, parseU32Data, parseFwData, parseBpfData and parseMatchAllData. This fixes a data race between these functions and any read access of var native, e.g. in LinkDeserialize as reported in issue #633. Also don't re-declare local variables shadowing the global package-level var. Fixes #633 Signed-off-by: Tobias Klauser <[email protected]>
gkodali-zededa
pushed a commit
to gkodali-zededa/netlink
that referenced
this issue
May 21, 2021
The package level var native (holding the native endianness) is initialized at package load time. Thus there is no need to re-initalize it in functions using it, e.g. (*Handle).filterModify, parseU32Data, parseFwData, parseBpfData and parseMatchAllData. This fixes a data race between these functions and any read access of var native, e.g. in LinkDeserialize as reported in issue vishvananda#633. Also don't re-declare local variables shadowing the global package-level var. Fixes vishvananda#633 Signed-off-by: Tobias Klauser <[email protected]>
cyberys
pushed a commit
to cyberys/netlink
that referenced
this issue
Apr 5, 2022
The package level var native (holding the native endianness) is initialized at package load time. Thus there is no need to re-initalize it in functions using it, e.g. (*Handle).filterModify, parseU32Data, parseFwData, parseBpfData and parseMatchAllData. This fixes a data race between these functions and any read access of var native, e.g. in LinkDeserialize as reported in issue vishvananda#633. Also don't re-declare local variables shadowing the global package-level var. Fixes vishvananda#633 Signed-off-by: Tobias Klauser <[email protected]>
cjmakes
pushed a commit
to cjmakes/netlink
that referenced
this issue
Jun 29, 2022
The package level var native (holding the native endianness) is initialized at package load time. Thus there is no need to re-initalize it in functions using it, e.g. (*Handle).filterModify, parseU32Data, parseFwData, parseBpfData and parseMatchAllData. This fixes a data race between these functions and any read access of var native, e.g. in LinkDeserialize as reported in issue vishvananda#633. Also don't re-declare local variables shadowing the global package-level var. Fixes vishvananda#633 Signed-off-by: Tobias Klauser <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using github.com/vishvananda/netlink v1.1.1-0.20201231054507-6ffafa9fc19b
Go race detector reported a race between
netlink.parseBpfData()
andnetlink.LinkDeserialize()
.Apparently this is about the
native
variable:filter_linux.go:704
:and
link_linux.go:1792
:The text was updated successfully, but these errors were encountered: