Maurice van der Pot
2007-Jun-03 20:00 UTC
[Nouveau] [Patch] fix wrapping of index into hash table in nouveau_ht_object_insert()
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 at gentoo.org http://www.gentoo.org Creator of BiteMe! griffon26 at kfk4ever.com http://www.kfk4ever.com -------------- next part -------------- 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; -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.freedesktop.org/archives/nouveau/attachments/20070603/93ec786f/attachment.pgp