mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: khali@linux-fr.org, linux-kernel@vger.kernel.org, aarnold@elsa.de
Subject: Re: [BUG 2.2/2.4/2.6] broken memsets in net/sk_mca.c (multicast)
Date: Sat, 10 Apr 2004 01:59:36 -0700	[thread overview]
Message-ID: <20040410015936.5ad35c73.akpm@osdl.org> (raw)
In-Reply-To: <20040410094924.C32143@flint.arm.linux.org.uk>

Russell King <rmk+lkml@arm.linux.org.uk> wrote:
>
> Erm...

--- 25/drivers/net/sk_mca.c~sk_mca-multicast-fix	2004-04-10 01:42:29.464928112 -0700
+++ 25-akpm/drivers/net/sk_mca.c	2004-04-10 01:57:20.106530008 -0700
@@ -997,13 +997,13 @@ static void skmca_set_multicast_list(str
 		block.Mode &= ~LANCE_INIT_PROM;
 
 	if (dev->flags & IFF_ALLMULTI) {	/* get all multicasts */
-		memset(block.LAdrF, 8, 0xff);
+		memset(block.LAdrF, 0xff, sizeof(block.LAdrF));
 	} else {		/* get selected/no multicasts */
 
 		struct dev_mc_list *mptr;
 		int code;
 
-		memset(block.LAdrF, 8, 0x00);
+		memset(block.LAdrF, 0, sizeof(block.LAdrF));
 		for (mptr = dev->mc_list; mptr != NULL; mptr = mptr->next) {
 			code = GetHash(mptr->dmi_addr);
 			block.LAdrF[(code >> 3) & 7] |= 1 << (code & 7);

_


  reply	other threads:[~2004-04-10  8:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-10  8:20 Jean Delvare
2004-04-10  8:40 ` Andrew Morton
2004-04-10  8:49   ` Russell King
2004-04-10  8:59     ` Andrew Morton [this message]
2004-04-10 14:49       ` Jean Delvare
2004-04-10 11:52 ` Denis Vlasenko

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=20040410015936.5ad35c73.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=aarnold@elsa.de \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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

all inboxes | Powered by JetHome®