netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Jean Tourrilhes <jt@bougret.hpl.hp.com>,
	"David S. Miller" <davem@redhat.com>
Cc: irda-users@lists.sourceforge.net, netdev@oss.sgi.com
Subject: [PATCH] memory leak in irda/sa1100_ir.c
Date: Thu, 9 Oct 2003 09:37:52 -0700	[thread overview]
Message-ID: <20031009093752.01a374bc.shemminger@osdl.org> (raw)

This driver seems confused about what get done for it on module exit.
It needs to free the network device it created.

Patch against 2.6.0-test7

diff -urN -X dontdiff linux-2.5/drivers/net/irda/sa1100_ir.c linux-2.5-net/drivers/net/irda/sa1100_ir.c
--- linux-2.5/drivers/net/irda/sa1100_ir.c	2003-09-30 13:53:58.000000000 -0700
+++ linux-2.5-net/drivers/net/irda/sa1100_ir.c	2003-09-17 15:49:30.000000000 -0700
@@ -1132,12 +1132,8 @@
 	release_mem_region(__PREG(Ser2HSCR0), 0x1c);
 	release_mem_region(__PREG(Ser2UTCR0), 0x24);
 
-	/*
-	 * We now know that the netdevice is no longer in use, and all
-	 * references to our driver have been removed.  The only structure
-	 * which may still be present is the netdevice, which will get
-	 * cleaned up by net/core/dev.c
-	 */
+	if(dev)
+		free_netdev(dev);
 }
 
 static int __init sa1100ir_setup(char *line)

             reply	other threads:[~2003-10-09 16:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-09 16:37 Stephen Hemminger [this message]
2003-10-10  7:01 ` [PATCH] memory leak in irda/sa1100_ir.c David S. Miller

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=20031009093752.01a374bc.shemminger@osdl.org \
    --to=shemminger@osdl.org \
    --cc=davem@redhat.com \
    --cc=irda-users@lists.sourceforge.net \
    --cc=jt@bougret.hpl.hp.com \
    --cc=netdev@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).