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
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to