From 6f2479c67432f764bfc4e248689f1737c1935237 Mon Sep 17 00:00:00 2001 From: Robert Noland Date: Sat, 6 Sep 2008 18:37:06 -0400 Subject: [FreeBSD] Ensure that drm_pci_alloc is never called while locks are held. --- bsd-core/drm_bufs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bsd-core/drm_bufs.c') diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c index 45e01470..94f51386 100644 --- a/bsd-core/drm_bufs.c +++ b/bsd-core/drm_bufs.c @@ -595,8 +595,10 @@ static int drm_do_addbufs_pci(struct drm_device *dev, struct drm_buf_desc *reque page_count = 0; while (entry->buf_count < count) { + DRM_SPINUNLOCK(&dev->dma_lock); drm_dma_handle_t *dmah = drm_pci_alloc(dev, size, alignment, 0xfffffffful); + DRM_SPINLOCK(&dev->dma_lock); if (dmah == NULL) { /* Set count correctly so we free the proper amount. */ entry->buf_count = count; -- cgit v1.2.3