Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=11d9c2fd0ae74647ea2b52f9bdfa7a920b48d1f1
Commit:     11d9c2fd0ae74647ea2b52f9bdfa7a920b48d1f1
Parent:     54ba2f76e281286cf4b2860ed8354602eab4c1ef
Author:     Dave Airlie <[EMAIL PROTECTED]>
AuthorDate: Sun Feb 18 17:13:39 2007 +1100
Committer:  Dave Airlie <[EMAIL PROTECTED]>
CommitDate: Sun Mar 11 12:07:17 2007 +1100

    drm: fix crash with fops lock and fixup sarea/page size locking
    
    Signed-off-by: Dave Airlie <[EMAIL PROTECTED]>
---
 drivers/char/drm/drm_fops.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
index 898f47d..afe5f07 100644
--- a/drivers/char/drm/drm_fops.c
+++ b/drivers/char/drm/drm_fops.c
@@ -46,6 +46,7 @@ static int drm_setup(drm_device_t * dev)
        drm_local_map_t *map;
        int i;
        int ret;
+       u32 sareapage;
 
        if (dev->driver->firstopen) {
                ret = dev->driver->firstopen(dev);
@@ -56,7 +57,8 @@ static int drm_setup(drm_device_t * dev)
        dev->magicfree.next = NULL;
 
        /* prebuild the SAREA */
-       i = drm_addmap(dev, 0, SAREA_MAX, _DRM_SHM, _DRM_CONTAINS_LOCK, &map);
+       sareapage = max(SAREA_MAX, PAGE_SIZE);
+       i = drm_addmap(dev, 0, sareapage, _DRM_SHM, _DRM_CONTAINS_LOCK, &map);
        if (i != 0)
                return i;
 
@@ -84,7 +86,7 @@ static int drm_setup(drm_device_t * dev)
        INIT_LIST_HEAD(&dev->ctxlist->head);
 
        dev->vmalist = NULL;
-       dev->sigdata.lock = dev->lock.hw_lock = NULL;
+       dev->sigdata.lock = NULL;
        init_waitqueue_head(&dev->lock.lock_queue);
        dev->queue_count = 0;
        dev->queue_reserved = 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to