提交 f6501308 编写于 作者: D Dave Airlie 提交者: Dave Airlie

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

From: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: NDave Airlie <airlied@linux.ie>
上级 0c7b525c
......@@ -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 ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册