summaryrefslogtreecommitdiff
path: root/linux-core/drm_bufs.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_bufs.c')
-rw-r--r--linux-core/drm_bufs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c
index 9ce7cfff..b4e73699 100644
--- a/linux-core/drm_bufs.c
+++ b/linux-core/drm_bufs.c
@@ -404,7 +404,7 @@ int DRM(addbufs_agp)( struct inode *inode, struct file *filp,
buf->waiting = 0;
buf->pending = 0;
init_waitqueue_head( &buf->dma_wait );
- buf->pid = 0;
+ buf->filp = 0;
buf->dev_priv_size = sizeof(DRIVER_BUF_PRIV_T);
buf->dev_private = DRM(alloc)( sizeof(DRIVER_BUF_PRIV_T),
@@ -617,7 +617,7 @@ int DRM(addbufs_pci)( struct inode *inode, struct file *filp,
buf->waiting = 0;
buf->pending = 0;
init_waitqueue_head( &buf->dma_wait );
- buf->pid = 0;
+ buf->filp = 0;
#if __HAVE_DMA_HISTOGRAM
buf->time_queued = 0;
buf->time_dispatched = 0;
@@ -774,7 +774,7 @@ int DRM(addbufs_sg)( struct inode *inode, struct file *filp,
buf->waiting = 0;
buf->pending = 0;
init_waitqueue_head( &buf->dma_wait );
- buf->pid = 0;
+ buf->filp = 0;
buf->dev_priv_size = sizeof(DRIVER_BUF_PRIV_T);
buf->dev_private = DRM(alloc)( sizeof(DRIVER_BUF_PRIV_T),
@@ -1012,9 +1012,9 @@ int DRM(freebufs)( struct inode *inode, struct file *filp,
return -EINVAL;
}
buf = dma->buflist[idx];
- if ( buf->pid != current->pid ) {
- DRM_ERROR( "Process %d freeing buffer owned by %d\n",
- current->pid, buf->pid );
+ if ( buf->filp != filp ) {
+ DRM_ERROR( "Process %d freeing buffer not owned\n",
+ current->pid );
return -EINVAL;
}
DRM(free_buffer)( dev, buf );