From patchwork Thu Feb 25 08:49:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 81918 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1P8nRuu017618 for ; Thu, 25 Feb 2010 08:49:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753009Ab0BYIt1 (ORCPT ); Thu, 25 Feb 2010 03:49:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58718 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752233Ab0BYIt0 (ORCPT ); Thu, 25 Feb 2010 03:49:26 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1P8nIX2005373 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 25 Feb 2010 03:49:18 -0500 Received: from localhost (vpn2-11-188.ams2.redhat.com [10.36.11.188]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1P8nG1c028120; Thu, 25 Feb 2010 03:49:17 -0500 Date: Thu, 25 Feb 2010 09:49:15 +0100 From: Jiri Pirko To: Or Gerlitz Cc: netdev@vger.kernel.org, Jason Gunthorpe , linux-rdma@vger.kernel.org, davem@davemloft.net Subject: Re: [net-next-2.6 PATCH] infiniband: convert to use netdev_for_each_mc_addr Message-ID: <20100225084915.GA3171@psychotron.redhat.com> References: <20100224151108.GD2663@psychotron.lab.eng.brq.redhat.com> <4B862E07.7020002@Voltaire.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4B862E07.7020002@Voltaire.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 25 Feb 2010 08:49:28 +0000 (UTC) diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c index 9e2fa39..fd91569 100644 --- a/net/core/dev_mcast.c +++ b/net/core/dev_mcast.c @@ -96,6 +96,8 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl) int err; netif_addr_lock_bh(dev); + if (alen != dev->addr_len) + return -EINVAL; err = __dev_addr_add(&dev->mc_list, &dev->mc_count, addr, alen, glbl); if (!err) __dev_set_rx_mode(dev);