All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Fry <brazilnut@us.ibm.com>
To: tsbogend@alpha.franken.de, jgarzik@pobox.com, netdev@vger.kernel.org
Subject: [PATCH 2.6.17-rc5] pcnet32:  remove incorrect pcnet32_free_ring
Date: Thu, 25 May 2006 16:22:40 -0700	[thread overview]
Message-ID: <20060525232240.GA30918@us.ibm.com> (raw)

During a code scan for another change I discovered that this call to
pcnet32_free_ring must be removed.  If the open fails due to a lack of
memory all the ring structures are removed via the call to free_ring
and a subsequent call to open will dereference a null pointer in
pcnet32_init_ring.

Please apply to 2.6.17.

Signed-off-by:  Don Fry <brazilnut@us.ibm.com>

--- linux-2.6.17-rc5/drivers/net/orig.pcnet32.c	2006-05-25 15:59:12.000000000 -0700
+++ linux-2.6.17-rc5/drivers/net/pcnet32.c	2006-05-25 16:09:40.000000000 -0700
@@ -1774,8 +1774,6 @@ static int pcnet32_open(struct net_devic
 		lp->rx_dma_addr[i] = 0;
 	}
 
-	pcnet32_free_ring(dev);
-
 	/*
 	 * Switch back to 16bit mode to avoid problems with dumb
 	 * DOS packet driver after a warm reboot

-- 
Don Fry
brazilnut@us.ibm.com

             reply	other threads:[~2006-05-25 23:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-25 23:22 Don Fry [this message]
2006-05-27  1:33 ` [PATCH 2.6.17-rc5] pcnet32: remove incorrect pcnet32_free_ring Jeff Garzik

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=20060525232240.GA30918@us.ibm.com \
    --to=brazilnut@us.ibm.com \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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.