Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6501308 authored by Dave Airlie's avatar Dave Airlie Committed by Dave Airlie
Browse files

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



From: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent 0c7b525c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 ) {