Skip to content

Commit

Permalink
drm: ctx release can happen before dev->ctxlist is allocated
Browse files Browse the repository at this point in the history
From: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Dave Airlie authored and Dave Airlie committed Jul 7, 2005
1 parent 0c7b525 commit f650130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/drm/drm_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ int drm_release( struct inode *inode, struct file *filp )
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 ) {
Expand Down

0 comments on commit f650130

Please sign in to comment.