[lkml]   [2001]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: bdevname(), cdevname(), kdevname() - static buffers
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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:12    [W:0.401 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site