From patchwork Mon Oct 25 09:06:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ursula Braun X-Patchwork-Id: 69081 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 17DB0B70D4 for ; Mon, 25 Oct 2010 20:07:42 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753990Ab0JYJHU (ORCPT ); Mon, 25 Oct 2010 05:07:20 -0400 Received: from mtagate3.de.ibm.com ([195.212.17.163]:54986 "EHLO mtagate3.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753663Ab0JYJHS (ORCPT ); Mon, 25 Oct 2010 05:07:18 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.13.1/8.13.1) with ESMTP id o9P97HPY031145; Mon, 25 Oct 2010 09:07:17 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9P97HnK3780854; Mon, 25 Oct 2010 11:07:17 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o9P97GUD004793; Mon, 25 Oct 2010 11:07:17 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id o9P97GGC004790; Mon, 25 Oct 2010 11:07:16 +0200 Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 4267) id 6FF9512243A1; Mon, 25 Oct 2010 11:07:16 +0200 (CEST) Message-Id: <20101025090716.315678235@linux.vnet.ibm.com> User-Agent: quilt/0.47-1 Date: Mon, 25 Oct 2010 11:06:43 +0200 From: Ursula Braun To: netdev@vger.kernel.org, linux-s390@vger.kernel.org Cc: vosburgh@de.ibm.com, Ursula Braun , "David S. Miller" , Herbert Xu Subject: [patch 1/1] [PATCH BUG_FIX] ipv6: fix refcnt problem related to POSTDAD state References: <20101025090642.958260964@linux.vnet.ibm.com> Content-Disposition: inline; filename=addrconf.patch Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Subject: [patch 1/1] [PATCH BUG_FIX] ipv6: fix refcnt problem related to POSTDAD state From: Ursula Braun After running this bonding setup script modprobe bonding miimon=100 mode=0 max_bonds=1 ifconfig bond0 10.1.1.1/16 ifenslave bond0 eth1 ifenslave bond0 eth3 on s390 with qeth-driven slaves, modprobe -r fails with this message unregister_netdevice: waiting for bond0 to become free. Usage count = 1 due to twice detection of duplicate address. Problem is caused by a missing decrease of ifp->refcnt in addrconf_dad_failure. An extra call of in6_ifa_put(ifp) solves it. Problem has been introduced with commit f2344a131bccdbfc5338e17fa71a807dee7944fa. Signed-off-by: Ursula Braun Cc: David S. Miller Cc: Herbert Xu Acked-by: Herbert Xu --- net/ipv6/addrconf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1426,8 +1426,10 @@ void addrconf_dad_failure(struct inet6_i { struct inet6_dev *idev = ifp->idev; - if (addrconf_dad_end(ifp)) + if (addrconf_dad_end(ifp)) { + in6_ifa_put(ifp); return; + } if (net_ratelimit()) printk(KERN_INFO "%s: IPv6 duplicate address %pI6c detected!\n",