Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Apr 2004 22:58:31 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        Mark Murray <markm@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/random randomdev.c
Message-ID:  <200404132258.31816.jhb@FreeBSD.org>
In-Reply-To: <200404120913.i3C9DOkd075451@repoman.freebsd.org>
References:  <200404120913.i3C9DOkd075451@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 12 April 2004 05:13 am, Mark Murray wrote:
> markm       2004/04/12 02:13:24 PDT
>
>   FreeBSD src repository
>
>   Modified files:
>     sys/dev/random       randomdev.c
>   Log:
>   Fix "sleeping without a mutex" panic.

You should drop the lock before uiomove().  If the uio can possibly reference 
user memory, then uiomove() will do a copyout() which can fault and thus 
sleep if the page is in swap.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404132258.31816.jhb>