Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760380Ab0GWT7v (ORCPT ); Fri, 23 Jul 2010 15:59:51 -0400 Received: from g5t0006.atlanta.hp.com ([15.192.0.43]:18545 "EHLO g5t0006.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760121Ab0GWT7s (ORCPT ); Fri, 23 Jul 2010 15:59:48 -0400 Date: Fri, 23 Jul 2010 13:59:47 -0600 From: Greg Edwards To: Andy Gospodarek Cc: Jay Vosburgh , "bonding-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: Re: [PATCH] bonding: set device in RLB ARP packet handler Message-ID: <20100723195947.GA7123@w-gedwards.lhn.com> References: <20100723193456.GS7497@gospo.rdu.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100723193456.GS7497@gospo.rdu.redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2412 Lines: 62 On Fri, Jul 23, 2010 at 07:34:56PM +0000, Andy Gospodarek wrote: > On Thu, Jul 22, 2010 at 3:52 PM, Greg Edwards wrote: >> With commit 6146b1a4, the dev field in the RLB ARP packet handler was >> set to NULL to wildcard and accommodate balancing VLANs on top of >> bonds. >> >> This has the side-effect of the packet handler being called against >> other, non RLB-enabled bonds, and a kernel oops results when it tries >> to >> dereference rx_hashtbl in rlb_update_entry_from_arp(), which won't be >> set for those bonds, e.g. active-backup. >> >> With the __netif_receive_skb() changes from commit 1f3c8804, frames >> received on VLANs correctly make their way to the bond's handler, >> so we no longer need to wildcard the device. > > I see this problem as well, but I would propose to fix it another way to > not alter the receive path so close to the release of 2.6.35 and to > catch this for 802.3ad bonds as well. Is the problem demonstrable with 802.3ad bonds? bond_register_lacpdu() sets pk_type->dev = bond->dev. >> Signed-off-by: Greg Edwards >> --- >> Jay, >> >> The oops can be reproduced by: >> >> modprobe bonding >> >> echo active-backup > /sys/class/net/bond0/bonding/mode >> echo 100 > /sys/class/net/bond0/bonding/miimon >> ifconfig bond0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx >> echo +eth0 > /sys/class/net/bond0/bonding/slaves >> echo +eth1 > /sys/class/net/bond0/bonding/slaves >> >> echo +bond1 > /sys/class/net/bonding_masters >> echo balance-alb > /sys/class/net/bond1/bonding/mode >> echo 100 > /sys/class/net/bond1/bonding/miimon >> ifconfig bond1 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx >> echo +eth2 > /sys/class/net/bond1/bonding/slaves >> echo +eth3 > /sys/class/net/bond1/bonding/slaves >> >> Pass some traffic on bond0. Boom. >> > > bonding: make sure mode-specific handlers handle appropriate frames > > This patch will exit out of rlb_arp_recv and bond_3ad_lacpdu_recv early > if the bond receiving the frame isn't using that mode. I had originally thought of doing something like this, but it didn't seem as clean. I don't have strong feelings one way or the other, though. Greg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/