tree f31074082bcdda3188917706fb040b67cce8a40e
parent 0c7b525c344bc29a760c37053f8d5c80292ee1be
author Dave Airlie <[EMAIL PROTECTED](none)> Thu, 07 Jul 2005 20:17:42 +1000
committer Dave Airlie <[EMAIL PROTECTED]> Thu, 07 Jul 2005 20:17:42 +1000

drm: ctx release can happen before dev->ctxlist is allocated

From: Jon Smirl <[EMAIL PROTECTED]>
Signed-off-by: Dave Airlie <[EMAIL PROTECTED]>

 drivers/char/drm/drm_fops.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
--- a/drivers/char/drm/drm_fops.c
+++ b/drivers/char/drm/drm_fops.c
@@ -259,7 +259,7 @@ int drm_release( struct inode *inode, st
        drm_fasync( -1, filp, 0 );
 
        down( &dev->ctxlist_sem );
-       if ( !list_empty( &dev->ctxlist->head ) ) {
+       if ( dev->ctxlist && (!list_empty(&dev->ctxlist->head))) {
                drm_ctx_list_t *pos, *n;
 
                list_for_each_entry_safe( pos, n, &dev->ctxlist->head, head ) {
-
To unsubscribe from this list: send the line "unsubscribe bk-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