lkml.org 
[lkml]   [2016]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] ipv6: release idev lock before calling ipv6_ifa_notify()
From
From: Gregory Herrero <gregory.herrero@intel.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.

\
 
 \ /
  Last update: 2016-01-30 03:01    [W:0.187 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site