[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f405d9b-460c-49f7-91b2-d147d9818369@gmail.com>
Date: Sat, 10 May 2025 10:46:32 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ingo Molnar <mingo@...nel.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Documentation of locking needs when working with lists?
Even though lists are used everywhere, I was surprised not being able to find
documentation about which operations need locking, and which ones are safe
lock-less.
My case:
I have a list where the only operation is adding entries.
It's clear that adding entries has to be serialized.
Question is whether a list_for_each_entry is safe lock-less.
Looking at the code I *think* it's safe, under the precondition that
reading/writing pointers is atomic.
Any hint or documentation link would be appreciated. Thanks!
Powered by blists - more mailing lists