From: Dave Jones <davej@codemonkey.org.uk>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: torvalds@transmeta.com, dri-devel@lists.sourceforge.net
Subject: Re: Update direct-rendering to current DRI CVS tree.
Date: Sun, 30 Mar 2003 12:45:44 +0100 [thread overview]
Message-ID: <20030330114544.GB16060@suse.de> (raw)
In-Reply-To: <200303300712.h2U7CVB32581@hera.kernel.org>
On Sun, Mar 30, 2003 at 06:34:37AM +0000, Linux Kernel wrote:
This bit seems to be backing out a memleak fix..
(takedown doesn't kfree 'device' & 'minor' that I can see.)
> diff -Nru a/drivers/char/drm/drm_drv.h b/drivers/char/drm/drm_drv.h
> --- a/drivers/char/drm/drm_drv.h Sat Mar 29 23:12:35 2003
> +++ b/drivers/char/drm/drm_drv.h Sat Mar 29 23:12:35 2003
> @@ -576,13 +578,9 @@
> memset( (void *)dev, 0, sizeof(*dev) );
> dev->count_lock = SPIN_LOCK_UNLOCKED;
> sema_init( &dev->struct_sem, 1 );
> - init_timer( &dev->timer );
> - init_waitqueue_head( &dev->context_wait );
>
> - if ((DRM(minor)[i] = DRM(stub_register)(DRIVER_NAME, &DRM(fops),dev)) < 0) {
> - retcode = -EPERM;
> - goto fail_reg;
> - }
> + if ((DRM(minor)[i] = DRM(stub_register)(DRIVER_NAME, &DRM(fops),dev)) < 0)
> + return -EPERM;
> dev->device = MKDEV(DRM_MAJOR, DRM(minor)[i] );
> dev->name = DRIVER_NAME;
>
> @@ -591,8 +589,9 @@
> #if __MUST_HAVE_AGP
> if ( dev->agp == NULL ) {
> DRM_ERROR( "Cannot initialize the agpgart module.\n" );
> - retcode = -ENOMEM;
> - goto fail;
> + DRM(stub_unregister)(DRM(minor)[i]);
> + DRM(takedown)( dev );
> + return -ENOMEM;
> }
> #endif
> #if __REALLY_HAVE_MTRR
> @@ -608,7 +607,9 @@
> retcode = DRM(ctxbitmap_init)( dev );
> if( retcode ) {
> DRM_ERROR( "Cannot allocate memory for context bitmap.\n" );
> - goto fail;
> + DRM(stub_unregister)(DRM(minor)[i]);
> + DRM(takedown)( dev );
> + return retcode;
> }
> #endif
> DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d\n",
> @@ -623,17 +624,6 @@
> DRIVER_POSTINIT();
>
> return 0;
> -
> -#if (__REALLY_HAVE_AGP && __MUST_HAVE_AGP) || __HAVE_CTX_BITMAP
> -fail:
> - DRM(stub_unregister)(DRM(minor)[i]);
> - DRM(takedown)( dev );
> -#endif
> -
> -fail_reg:
> - kfree (DRM(device));
> - kfree (DRM(minor));
> - return retcode;
> }
>
> /* drm_cleanup is called via cleanup_module at module unload time.
...
> @@ -41,7 +42,7 @@
>
> /* malloc/free without the overhead of DRM(alloc) */
> #define DRM_MALLOC(x) kmalloc(x, GFP_KERNEL)
> -#define DRM_FREE(x) kfree(x)
> +#define DRM_FREE(x,size) kfree(x)
eww. wtf is this for ? Some cross-OS compataiblity gunk ?
> diff -Nru a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c
> --- a/drivers/char/drm/i830_dma.c Sat Mar 29 23:12:35 2003
> +++ b/drivers/char/drm/i830_dma.c Sat Mar 29 23:12:35 2003
> @@ -46,8 +47,6 @@
> #define I830_BUF_UNMAPPED 0
> #define I830_BUF_MAPPED 1
>
> -#define RING_LOCALS unsigned int outring, ringmask; volatile char *virt;
> -
> #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,2)
> #define down_write down
> #define up_write up
#if can go, like it did in other parts of the patch.
I would read through the other 10 billion lines, but I lost
enthusiasm.. More frequent merges may help here.
With the two trees in sync, would it help to have DRI cvs changes
tracked in a bk tree you could pull from ?
It could maybe even be scripted. Doing the opposite of
Larry's bk->cvs gizmo should be easier due to the linear
nature of cvs.
Dave
next parent reply other threads:[~2003-03-30 11:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200303300712.h2U7CVB32581@hera.kernel.org>
2003-03-30 11:45 ` Dave Jones [this message]
2003-03-30 14:14 ` Update direct-rendering to current DRI CVS tree Nicholas Wourms
2003-03-30 16:55 ` Christoph Hellwig
2003-03-30 17:41 ` Linus Torvalds
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=20030330114544.GB16060@suse.de \
--to=davej@codemonkey.org.uk \
--cc=dri-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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.