summaryrefslogtreecommitdiff
path: root/arch/um/drivers/random.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-09-29 01:58:50 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 09:18:04 -0700
commit730760e90a173ef81f89beed2f1dad2fab310f68 (patch)
treee60039deb19683fac30e58277450c657ecd33e07 /arch/um/drivers/random.c
parentb10aeeef554eb1ff80e10111829f6e7484877811 (diff)
[PATCH] uml: locking documentation
Some locking documentation and a cleanup. uml_exitcode is copied into a local before sprintf sees it, in case sprintf does anything non-atomic with it. The rest are comments about why certain globals don't need any kind of locking. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/random.c')
-rw-r--r--arch/um/drivers/random.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index ae9909415b9c..73b2bdd6d2d3 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -20,6 +20,10 @@
#define RNG_MISCDEV_MINOR 183 /* official */
+/* Changed at init time, in the non-modular case, and at module load
+ * time, in the module case. Presumably, the module subsystem
+ * protects against a module being loaded twice at the same time.
+ */
static int random_fd = -1;
static int rng_dev_open (struct inode *inode, struct file *filp)