Messages in this thread | | | Date | Fri, 18 Jul 2008 11:46:16 -0700 | From | Greg KH <> | Subject | Re: debugfs_create_u*() not SMP-safe |
| |
On Fri, Jul 18, 2008 at 06:52:37AM +0300, Eduard - Gabriel Munteanu wrote: > 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.
That's true, so don't do multiple writes to a debugfs file at the same time :)
> 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?
This is for _debug_ data, not stuff that is "critical". This is for informational or debug purposes only. If you really care about the data always being correct here, then don't use debugfs, that's not what it is for.
Hope this helps,
greg k-h
| |