From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, eric.dumazet@gmail.com, fbl@redhat.com
Subject: [patch net 3/3] team: fix checks in team_get_first_port_txable_rcu()
Date: Sat, 8 Jun 2013 15:00:55 +0200 [thread overview]
Message-ID: <1370696455-12221-4-git-send-email-jiri@resnulli.us> (raw)
In-Reply-To: <1370696455-12221-1-git-send-email-jiri@resnulli.us>
should be checked if "cur" is txable, not "port".
Introduced by commit 6e88e1357c "team: use function team_port_txable()
for determing enabled and up port"
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
include/linux/if_team.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index 4474557..16fae64 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -249,12 +249,12 @@ team_get_first_port_txable_rcu(struct team *team, struct team_port *port)
return port;
cur = port;
list_for_each_entry_continue_rcu(cur, &team->port_list, list)
- if (team_port_txable(port))
+ if (team_port_txable(cur))
return cur;
list_for_each_entry_rcu(cur, &team->port_list, list) {
if (cur == port)
break;
- if (team_port_txable(port))
+ if (team_port_txable(cur))
return cur;
}
return NULL;
--
1.7.11.7
next prev parent reply other threads:[~2013-06-08 13:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-08 13:00 [patch net 0/3] team: couple of fixes Jiri Pirko
2013-06-08 13:00 ` [patch net 1/3] team: check return value of team_get_port_by_index_rcu() for NULL Jiri Pirko
2013-06-08 13:00 ` [patch net 2/3] team: move add to port list before port enablement Jiri Pirko
2013-06-08 13:00 ` Jiri Pirko [this message]
2013-06-12 7:57 ` [patch net 0/3] team: couple of fixes David Miller
2013-06-12 8:58 ` Jiri Pirko
2013-06-12 9:14 ` 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=1370696455-12221-4-git-send-email-jiri@resnulli.us \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=fbl@redhat.com \
--cc=netdev@vger.kernel.org \
/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).