netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Vosburgh <fubar@us.ibm.com>
To: Weiping Pan <panweiping3@gmail.com>
Cc: error27@gmail.com,
	Andy Gospodarek (supporter:BONDING DRIVER) <andy@greyhouse.net>,
	netdev@vger.kernel.org (open list:BONDING DRIVER),
	linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH] bonding:delete a dereference before check
Date: Mon, 13 Jun 2011 15:11:01 -0700	[thread overview]
Message-ID: <18226.1308003061@death> (raw)
In-Reply-To: <1307975410-13523-1-git-send-email-panweiping3@gmail.com>

Weiping Pan <panweiping3@gmail.com> wrote:

>Dan Carpenter found that there was a dereference before a check,
>added in 56d00c677de0(bonding:delete lacp_fast from ad_bond_info).
>
>Signed-off-by: Weiping Pan <panweiping3@gmail.com>

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>

	-J

> drivers/net/bonding/bond_3ad.c |    3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
>index 6122725..77da2e8 100644
>--- a/drivers/net/bonding/bond_3ad.c
>+++ b/drivers/net/bonding/bond_3ad.c
>@@ -1900,7 +1900,6 @@ void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution)
> int bond_3ad_bind_slave(struct slave *slave)
> {
> 	struct bonding *bond = bond_get_bond_by_slave(slave);
>-	int lacp_fast = bond->params.lacp_fast;
> 	struct port *port;
> 	struct aggregator *aggregator;
>
>@@ -1916,7 +1915,7 @@ int bond_3ad_bind_slave(struct slave *slave)
> 		// port initialization
> 		port = &(SLAVE_AD_INFO(slave).port);
>
>-		ad_initialize_port(port, lacp_fast);
>+		ad_initialize_port(port, bond->params.lacp_fast);
>
> 		port->slave = slave;
> 		port->actor_port_number = SLAVE_AD_INFO(slave).id;
>-- 
>1.7.4.4

  reply	other threads:[~2011-06-13 22:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-11  8:12 [smatch] re: bonding:delete lacp_fast from ad_bond_info Dan Carpenter
2011-06-13 14:30 ` [PATCH] bonding:delete a dereference before check Weiping Pan
2011-06-13 22:11   ` Jay Vosburgh [this message]
2011-06-13 22:29     ` David 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=18226.1308003061@death \
    --to=fubar@us.ibm.com \
    --cc=andy@greyhouse.net \
    --cc=error27@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=panweiping3@gmail.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).