[lkml]   [2003]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] [1/2] random: SMP locking
Oliver Xymoron <> wrote:
> This patch adds locking for SMP. Apparently Willy never managed to
> revive his laptop with his version so I revived mine.

hrm. I'm a random ignoramus. I'll look it over...

Are you really sure that all the decisions about where to use spin_lock()
vs spin_lock_irq() vs spin_lock_irqsave() are correct? They are

> @@ -1619,18 +1660,23 @@
> if (!capable(CAP_SYS_ADMIN))
> return -EPERM;
> p = (int *) arg;
> + spin_lock(&random_state->lock);
> ent_count = random_state->entropy_count;
> if (put_user(ent_count, p++) ||
> get_user(size, p) ||
> put_user(random_state->poolinfo.poolwords, p++))

Cannot perform userspace access while holding a lock - a pagefault could
occur, perform IO, schedule away and the same CPU tries to take the same
lock via a different process.

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:47    [W:0.080 / U:3.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site