this is to fix a deadloop in drm hang system issue.

(1 << bits) is an undefined value when bits == 32.
 gcc may generate 1 with this expression
 which will lead to an infinite retry loop in
 drm_ht_just_insert_please.
 Because of the different implement of hash_long,
 this  issue is more frequenly see on 64 bit system
This commit is contained in:
Zou Nan hai 2008-01-15 09:19:02 +08:00
parent 62df4f0a48
commit 806c1929dc

View file

@ -44,7 +44,7 @@ int drm_add_user_object(struct drm_file *priv, struct drm_user_object *item,
item->owner = priv;
ret = drm_ht_just_insert_please(&dev->object_hash, &item->hash,
(unsigned long)item, 32, 0, 0);
(unsigned long)item, 31, 0, 0);
if (ret)
return ret;