Date: Mon, 8 Nov 2010 16:50:47 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Andriy Gapon <avg@freebsd.org> Cc: freebsd-x11@freebsd.org, freebsd-current@freebsd.org, Nathan Whitehorn <nwhitehorn@freebsd.org> Subject: Re: radeon_cp_texture: page fault with non-sleepable locks held Message-ID: <20101108145047.GH2392@deviant.kiev.zoral.com.ua> In-Reply-To: <4CD80926.2010507@freebsd.org> References: <4CD3B1D2.30003@icyb.net.ua> <4CD7E401.1010206@freebsd.org> <20101108120403.GC2392@deviant.kiev.zoral.com.ua> <4CD7F5B9.3010606@freebsd.org> <20101108131620.GG2392@deviant.kiev.zoral.com.ua> <4CD80792.7070402@freebsd.org> <4CD80926.2010507@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Mon, Nov 08, 2010 at 04:28:54PM +0200, Andriy Gapon wrote: > on 08/11/2010 16:22 Nathan Whitehorn said the following: > > > > The other issue is that this can be a legal thing to do. If you have taken care to > > wire the userland buffers ahead of time, there is no problem copying > > copyin()/copyout() with sleepable locks held. The sysctl code does this. As such, > > you can't check for problems by panicing if sleepable locks are held. > > Nathan, > > very good point, thank you. > BTW, perhaps drm should be doing the same? > It seems that there are quite a few copyin/copyout calls (disguised with macros) > in e.g. sys/dev/drm/radeon_state.c and likely all of them are under dev_lock. > So it would be painful to add unlock+lock around each such call. This would be a DoS, due to the size of the buffers. [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzYDkcACgkQC3+MBN1Mb4jijwCePL+w9ipmTaC51MMQR6tgqxcf /3gAoJsHeLT6J3sdrt5+1Z65UOFjWiiI =v3UB -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101108145047.GH2392>
