All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] fix wrapping of index into hash table in nouveau_ht_object_insert()
@ 2007-06-03 20:00 Maurice van der Pot
  0 siblings, 0 replies; only message in thread
From: Maurice van der Pot @ 2007-06-03 20:00 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1.1: Type: text/plain, Size: 408 bytes --]

Hi guys,

Just something I noticed while reading the code.

I would be interested to know if you think the problem would occur in
normal usage.

Regards,
Maurice.

-- 
Maurice van der Pot

Gentoo Linux Developer   griffon26-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org     http://www.gentoo.org
Creator of BiteMe!       griffon26-bCGDfOjggl9Wk0Htik3J/w@public.gmane.org   http://www.kfk4ever.com


[-- Attachment #1.1.2: nouveau_object_ht.patch --]
[-- Type: text/plain, Size: 526 bytes --]

diff --git a/shared-core/nouveau_object.c b/shared-core/nouveau_object.c
index ace7c2a..e36568c 100644
--- a/shared-core/nouveau_object.c
+++ b/shared-core/nouveau_object.c
@@ -167,7 +167,7 @@ nouveau_ht_object_insert(drm_device_t* dev, int channel, uint32_t handle,
 
 	while (NV_READ(ht_base + ofs) || NV_READ(ht_base + ofs + 4)) {
 		ofs += 8;
-		if (ofs == ht_end) ofs = ht_base;
+		if (ofs == dev_priv->ramht_size) ofs = 0;
 		if (ofs == o_ofs) {
 			DRM_ERROR("no free hash table entries\n");
 			return 1;

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-03 20:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-03 20:00 [Patch] fix wrapping of index into hash table in nouveau_ht_object_insert() Maurice van der Pot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.