[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20141205224436.061307958@linuxfoundation.org>
Date: Fri, 5 Dec 2014 14:45:17 -0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Jet Chen <jet.chen@...el.com>,
"David S. Miller" <davem@...emloft.net>,
Steffen Klassert <steffen.klassert@...unet.com>,
Antonio Quartulli <antonio@...n-mesh.com>,
Marek Lindner <mareklindner@...mailbox.ch>,
Cong Wang <xiyou.wangcong@...il.com>,
Cong Wang <cwang@...pensource.com>
Subject: [PATCH 3.14 71/73] batman: fix a bogus warning from batadv_is_on_batman_iface()
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cong Wang <cwang@...pensource.com>
commit b6ed5498601df40489606dbc14a9c7011c16630b upstream.
batman tries to search dev->iflink to check if it's a batman interface,
but ->iflink could be 0, which is not a valid ifindex. It should just
avoid iflink == 0 case.
Reported-by: Jet Chen <jet.chen@...el.com>
Tested-by: Jet Chen <jet.chen@...el.com>
Cc: David S. Miller <davem@...emloft.net>
Cc: Steffen Klassert <steffen.klassert@...unet.com>
Cc: Antonio Quartulli <antonio@...n-mesh.com>
Cc: Marek Lindner <mareklindner@...mailbox.ch>
Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Signed-off-by: Cong Wang <cwang@...pensource.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
net/batman-adv/hard-interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -83,7 +83,7 @@ static bool batadv_is_on_batman_iface(co
return true;
/* no more parents..stop recursion */
- if (net_dev->iflink == net_dev->ifindex)
+ if (net_dev->iflink == 0 || net_dev->iflink == net_dev->ifindex)
return false;
/* recurse over the parent device */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists