Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299058
b: refs/heads/master
c: 44e4360
h: refs/heads/master
v: v3
  • Loading branch information
Mathieu Desnoyers authored and Linus Torvalds committed Apr 12, 2012
1 parent fd3c19b commit 1ca0c47
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d833049bd20570cbbadeb5228c579f9f3aaa4e03
refs/heads/master: 44e4360fa3384850d65dd36fb4e6e5f2f112709b
11 changes: 8 additions & 3 deletions trunk/drivers/char/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -1260,10 +1260,15 @@ static int proc_do_uuid(ctl_table *table, int write,
uuid = table->data;
if (!uuid) {
uuid = tmp_uuid;
uuid[8] = 0;
}
if (uuid[8] == 0)
generate_random_uuid(uuid);
} else {
static DEFINE_SPINLOCK(bootid_spinlock);

spin_lock(&bootid_spinlock);
if (!uuid[8])
generate_random_uuid(uuid);
spin_unlock(&bootid_spinlock);
}

sprintf(buf, "%pU", uuid);

Expand Down

0 comments on commit 1ca0c47

Please sign in to comment.