From 806c1929dcd344f6eab3133584a9c4ce9f3f47bc Mon Sep 17 00:00:00 2001 From: Zou Nan hai Date: Tue, 15 Jan 2008 09:19:02 +0800 Subject: 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 --- linux-core/drm_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-core') diff --git a/linux-core/drm_object.c b/linux-core/drm_object.c index 5ade6178..7d2e3a2b 100644 --- a/linux-core/drm_object.c +++ b/linux-core/drm_object.c @@ -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; -- cgit v1.2.3