summaryrefslogtreecommitdiff
path: root/lib/checksum.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-04-25 11:00:45 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-04-25 11:00:45 -0700
commit29e95a4b2686b2cfb5564b3fb31371d5f71c6b66 (patch)
treed3ddb36c53ba23898a985dab5f75cea85517ab17 /lib/checksum.c
parentbc1bb2a49bae915107fd58705edb1e32db92c635 (diff)
parent63a759694eed61025713b3e14dd827c8548daadc (diff)
Merge tag 'core-debugobjects-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core debugobjects update from Thomas Gleixner: "A single update to debugobjects: Prevent a race vs statically initialized objects. Such objects are usually not initialized via an init() function. They are special cased and detected on first use under the assumption that they are already correctly initialized via the static initializer. This works correctly unless there are two concurrent debug object operations on such an object. The first one detects that the object is not yet tracked and tries to establish a tracking object after dropping the debug objects hash bucket lock. The concurrent operation does the same. The one which wins the race ends up modifying the state of the object which makes the other one fail resulting in a bogus debug objects warning. Prevent this by making the detection of a static object and the allocation of a tracking object atomic under the hash bucket lock. So the first one to acquire the hash bucket lock will succeed and the second one will observe the correct tracking state. This race existed forever but was only exposed when the timer wheel code added a debug_object_assert_init() call outside of the timer base locked region. This replaced the previous warning about timer::function being NULL which had to be removed when the timer_shutdown() mechanics were added" * tag 'core-debugobjects-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobject: Prevent init race with static objects
Diffstat (limited to 'lib/checksum.c')
0 files changed, 0 insertions, 0 deletions