From: Andreas Dilger <adilger@turbolabs.com>
To: Russ Weight <rweight@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: bdevname(), cdevname(), kdevname() - static buffers
Date: Fri, 2 Nov 2001 12:03:25 -0700 [thread overview]
Message-ID: <20011102120325.K746@lynx.no> (raw)
In-Reply-To: <20011102104211.A1279@us.ibm.com>
In-Reply-To: <20011102104211.A1279@us.ibm.com>; from rweight@us.ibm.com on Fri, Nov 02, 2001 at 10:42:11AM -0800
On Nov 02, 2001 10:42 -0800, Russ Weight wrote:
> I was looking at the usage of bdevname(), cdevname(), and kdevname(),
> and noticed that they each return a pointer to a static buffer.
> This buffer contains a formatted device name, which is typically
> printed immediately following the call. However, I don't see any
> explicit lock protection for these buffers.
>
> For SMP systems, is there something implicit in their use that
> prevents a race on these buffers? Has anyone seen garbled device
> names being printed (which might be attributed to a race)?
I think the general usage of these is only for informational needs, so
if there is a rare race it is not worth fixing.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
prev parent reply other threads:[~2001-11-02 19:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-02 18:42 Russ Weight
2001-11-02 18:59 ` Alan Cox
2001-11-02 19:03 ` Andreas Dilger [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=20011102120325.K746@lynx.no \
--to=adilger@turbolabs.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rweight@us.ibm.com \
/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®