All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maurice van der Pot <griffon26-bCGDfOjggl9Wk0Htik3J/w@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [Patch] fix wrapping of index into hash table in	nouveau_ht_object_insert()
Date: Sun, 3 Jun 2007 22:00:04 +0200	[thread overview]
Message-ID: <20070603200003.GC9204@kfk4ever.com> (raw)


[-- 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

                 reply	other threads:[~2007-06-03 20:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070603200003.GC9204@kfk4ever.com \
    --to=griffon26-bcgdfojggl9wk0htik3j/w@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.