mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: torvalds@linux-foundation.org,
	Randy Dunlap <rdunlap@xenotime.net>,
	linux-kernel@vger.kernel.org,
	Pekka Enberg <penberg@cs.helsinki.fi>
Subject: Re: debugfs_create_u*() not SMP-safe
Date: Fri, 18 Jul 2008 11:46:16 -0700	[thread overview]
Message-ID: <20080718184616.GB17294@kroah.com> (raw)
In-Reply-To: <20080718035237.GA7744@localhost>

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

      reply	other threads:[~2008-07-18 18:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-18  3:52 Eduard - Gabriel Munteanu
2008-07-18 18:46 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080718184616.GB17294@kroah.com \
    --to=greg@kroah.com \
    --cc=eduard.munteanu@linux360.ro \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=rdunlap@xenotime.net \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®