1
0
Fork 0

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

From: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
hifive-unleashed-5.1
Dave Airlie 2005-07-07 20:17:42 +10:00 committed by Dave Airlie
parent 0c7b525c34
commit f650130803
1 changed files with 1 additions and 1 deletions

View File

@ -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 ) {