diff -ur /home/alex/checkouts/linux-2.6-git/drivers/gpu/drm/drm_hashtab.c linux-2.6.38-rc1/drivers/gpu/drm/drm_hashtab.c --- /home/alex/checkouts/linux-2.6-git/drivers/gpu/drm/drm_hashtab.c 2010-04-07 11:02:04.000000000 -0500 +++ linux-2.6.38-rc1/drivers/gpu/drm/drm_hashtab.c 2011-01-19 12:04:30.000000000 -0500 @@ -111,6 +111,9 @@ unsigned long key = item->key; hashed_key = hash_long(key, ht->order); + + BUG_ON(hashed_key >= ht->size); + h_list = &ht->table[hashed_key]; parent = NULL; hlist_for_each(list, h_list) { diff -ur /home/alex/checkouts/linux-2.6-git/drivers/gpu/drm/i915/i915_gem.c linux-2.6.38-rc1/drivers/gpu/drm/i915/i915_gem.c --- /home/alex/checkouts/linux-2.6-git/drivers/gpu/drm/i915/i915_gem.c 2011-01-12 18:53:37.000000000 -0500 +++ linux-2.6.38-rc1/drivers/gpu/drm/i915/i915_gem.c 2011-01-19 11:57:54.000000000 -0500 @@ -1331,6 +1331,8 @@ struct drm_gem_mm *mm = dev->mm_private; struct drm_map_list *list = &obj->base.map_list; + BUG_ON(!mutex_is_locked(&dev->struct_mutex)); + drm_ht_remove_item(&mm->offset_hash, &list->hash); drm_mm_put_block(list->file_offset_node); kfree(list->map);