Re: radeon_cp_texture: page fault with non-sleepable locks held

From: Kostik Belousov <kostikbel_at_gmail.com>
Date: Mon, 8 Nov 2010 16:50:47 +0200
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.

Received on Mon Nov 08 2010 - 13:50:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:09 UTC