Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jun 2001 22:01:04 -0700 (PDT)
From:      simonw@lucent.com
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/27849: AGP RELEASE ioctl frees memory
Message-ID:  <200106030501.f53514r03464@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         27849
>Category:       misc
>Synopsis:       AGP RELEASE ioctl frees memory
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 02 22:10:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Simon Walton
>Release:        4.2
>Organization:
>Environment:
FreeBSD stepney 4.2-RELEASE FreeBSD 4.2-RELEASE #8: Mon May 28 23:34:51 PDT 2001     simonw@stepney:/usr/src/sys/compile/STEPNEY  i386

>Description:
The implementation of the ioctl AGPIOC_RELEASE includes the following
code:

        /*
         * Clear out the aperture and free any outstanding memory blocks.
         */     
        while ((mem = TAILQ_FIRST(&sc->as_memory)) != 0) {
                if (mem->am_is_bound)
                        AGP_UNBIND_MEMORY(dev, mem);
                AGP_FREE_MEMORY(dev, mem);
        }

Clearly this deallocates all the memory that the application
has attached to the AGP space. Yet the spec for the agp ioctls
(at least the one I have) states that this ioctl merely releases
control of the agp device - it doesn't deallocate memory that the
app allocated while it had control. That is done with the UNBIND
and DEALLOCATE commands.

   The Utah GLX code certainly assumes this behaviour - I had to
comment out the RELEASE ioctl to get it to work with FreeBSD.

>How-To-Repeat:
Use Xfree86 3.3.5 with the Utah GLX module (add -DHAVE_LINUX_NEWAGP).
It will complain about 
>Fix:
I think just taking out the code segment given above
will suffice.

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106030501.f53514r03464>