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

From: Andriy Gapon <avg_at_freebsd.org>
Date: Mon, 08 Nov 2010 16:28:54 +0200
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.

-- 
Andriy Gapon
Received on Mon Nov 08 2010 - 13:28:57 UTC

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