[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160129.174303.663518084694618919.davem@davemloft.net>
Date: Fri, 29 Jan 2016 17:43:03 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: gregory.herrero@...el.com
Cc: netdev@...r.kernel.org, kuznet@....inr.ac.ru, jmorris@...ei.org,
yoshfuji@...ux-ipv6.org, kaber@...sh.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipv6: release idev lock before calling
ipv6_ifa_notify()
From: Gregory Herrero <gregory.herrero@...el.com>
Date: Thu, 28 Jan 2016 09:34:52 +0100
> @@ -2302,8 +2302,11 @@ static void manage_tempaddrs(struct inet6_dev *idev,
> ift->flags &= ~IFA_F_DEPRECATED;
>
> spin_unlock(&ift->lock);
> - if (!(flags&IFA_F_TENTATIVE))
> + if (!(flags & IFA_F_TENTATIVE)) {
> + read_unlock_bh(&idev->lock);
> ipv6_ifa_notify(0, ift);
> + read_lock_bh(&idev->lock);
> + }
> }
>
> if ((create || list_empty(&idev->tempaddr_list)) &&
You can't do this, the idev->lock has to be held to keep the list we
are iterating over from changing.
Powered by blists - more mailing lists