[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080718035237.GA7744@localhost>
Date: Fri, 18 Jul 2008 06:52:37 +0300
From: Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>
To: greg@...ah.com
Cc: torvalds@...ux-foundation.org, Randy Dunlap <rdunlap@...otime.net>,
linux-kernel@...r.kernel.org, Pekka Enberg <penberg@...helsinki.fi>
Subject: debugfs_create_u*() not SMP-safe
Hi,
I noticed debugfs_create_u*() functions don't allow for any precautions
to be taken while doing r/w to the exported variables. Thus any export of a
variable isn't SMP-safe.
As far as I can tell, this only works safely for constant data. Let me
ask then, what is the purpose of these functions? Are they intended only
for unreliable data?
As I see it, they could be replaced by one of the following:
- Have them only export atomic data, that is atomic_t variables.
- Have them take a lock as a parameter, which the read() / write()
handler grabs. The kernel code that exported the variable should also
do r/w while holding that same lock.
Or am I wrong?
Thanks,
Eduard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists