All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Prasanna Meda <pmeda@akamai.com>
Cc: tulip-users@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	linux-net@vger.kernel.org, danner@akamai.com,
	bmancuso@akamai.com
Subject: Re: Poss. bug in tulip driver since 2.4.7
Date: Tue, 11 Nov 2003 18:54:19 -0800	[thread overview]
Message-ID: <20031111185419.0ff7a596.akpm@osdl.org> (raw)
In-Reply-To: <3FB1832C.35A52F9A@akamai.com>

Prasanna Meda <pmeda@akamai.com> wrote:
>
> The inner for loop shown below was not
>  supposed to be  inside  the  outside  loop.
>  They  also use  the  same index i.
>  Due to  this, when mc_count is more than
>  14,  with non ASIX chips,  panics, corruptions
>  and  denial of services to multicast addresses
>  can  result!
> 
>  http://lxr.linux.no/source/drivers/net/tulip/tulip_core.c#L1055

So can you confirm that the driver works correctly with this change?

--- 25/drivers/net/tulip/tulip_core.c~tulip-hash-fix	2003-11-11 18:51:52.000000000 -0800
+++ 25-akpm/drivers/net/tulip/tulip_core.c	2003-11-11 18:52:31.000000000 -0800
@@ -979,12 +979,13 @@ static void build_setup_frame_hash(u16 *
 	for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
 	     i++, mclist = mclist->next) {
 		int index = ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x1ff;
+		int j;
 
 		set_bit_le(index, hash_table);
 
-		for (i = 0; i < 32; i++) {
-			*setup_frm++ = hash_table[i];
-			*setup_frm++ = hash_table[i];
+		for (j = 0; j < 32; j++) {
+			*setup_frm++ = hash_table[j];
+			*setup_frm++ = hash_table[j];
 		}
 		setup_frm = &tp->setup_frame[13*6];
 	}

_


  reply	other threads:[~2003-11-12  2:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-12  0:47 Poss. bug in tulip driver since 2.4.7 Prasanna Meda
2003-11-12  2:54 ` Andrew Morton [this message]
2003-11-12  3:51   ` Jeff Garzik
2003-11-12 20:09   ` Prasanna Meda
2003-11-13  4:34     ` 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=20031111185419.0ff7a596.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=bmancuso@akamai.com \
    --cc=danner@akamai.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=pmeda@akamai.com \
    --cc=tulip-users@lists.sourceforge.net \
    /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.