diff --git a/[refs] b/[refs] index d284b1e2f469..9b7dded0271b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d833049bd20570cbbadeb5228c579f9f3aaa4e03 +refs/heads/master: 44e4360fa3384850d65dd36fb4e6e5f2f112709b diff --git a/trunk/drivers/char/random.c b/trunk/drivers/char/random.c index 54ca8b23cde3..4ec04a754733 100644 --- a/trunk/drivers/char/random.c +++ b/trunk/drivers/char/random.c @@ -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);