From owner-freebsd-bugs Sat Jun 2 22:10: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BC93237B42C for ; Sat, 2 Jun 2001 22:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f535A1c06792; Sat, 2 Jun 2001 22:10:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 259A737B422 for ; Sat, 2 Jun 2001 22:01:04 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f53514r03464; Sat, 2 Jun 2001 22:01:04 -0700 (PDT) (envelope-from nobody) Message-Id: <200106030501.f53514r03464@freefall.freebsd.org> Date: Sat, 2 Jun 2001 22:01:04 -0700 (PDT) From: simonw@lucent.com To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/27849: AGP RELEASE ioctl frees memory Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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