From: Dave Jones <davej@redhat.com>
To: netdev@oss.sgi.com
Subject: swapped memset arguments.
Date: Mon, 21 Mar 2005 21:44:57 -0500 [thread overview]
Message-ID: <20050322024457.GA11569@redhat.com> (raw)
You wouldn't believe how many instances of this bug I've
seen in the last few days in both userspace and kernelspace.
Signed-off-by: Dave Jones <davej@redhat.com>
--- bk-linus/net/ipv4/multipath_wrandom.c~ 2005-03-21 21:40:15.535597104 -0500
+++ bk-linus/net/ipv4/multipath_wrandom.c 2005-03-21 21:40:41.406664104 -0500
@@ -248,7 +248,7 @@ static void wrandom_set_nhinfo(__u32 net
target_route->gw = nh->nh_gw;
target_route->oif = nh->nh_oif;
- memset(&target_route->rcu, sizeof(struct rcu_head), 0);
+ memset(&target_route->rcu, 0, sizeof(struct rcu_head));
INIT_LIST_HEAD(&target_route->dests);
list_add_rcu(&target_route->list, &state[state_idx].head);
@@ -271,7 +271,7 @@ static void wrandom_set_nhinfo(__u32 net
target_dest->network = network;
target_dest->netmask = netmask;
target_dest->prefixlen = prefixlen;
- memset(&target_dest->rcu, sizeof(struct rcu_head), 0);
+ memset(&target_dest->rcu, 0, sizeof(struct rcu_head));
list_add_rcu(&target_dest->list, &target_route->dests);
}
next reply other threads:[~2005-03-22 2:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-22 2:44 Dave Jones [this message]
2005-03-23 4:09 ` swapped memset arguments 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=20050322024457.GA11569@redhat.com \
--to=davej@redhat.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).