All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] Revert "ipv6: Handle race in addrconf_dad_work"
@ 2019-10-03 21:46 David Ahern
  2019-10-03 21:53 ` Eric Dumazet
  2019-10-04 21:32 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: David Ahern @ 2019-10-03 21:46 UTC (permalink / raw)
  To: davem, jakub.kicinski
  Cc: netdev, rajendra.dendukuri, eric.dumazet, David Ahern, Eric Dumazet

From: David Ahern <dsahern@gmail.com>

This reverts commit a3ce2a21bb8969ae27917281244fa91bf5f286d7.

Eric reported tests failings with commit. After digging into it,
the bottom line is that the DAD sequence is not to be messed with.
There are too many cases that are expected to proceed regardless
of whether a device is up.

Revert the patch and I will send a different solution for the
problem Rajendra reported.

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>
---
 net/ipv6/addrconf.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index dd3be06d5a06..6a576ff92c39 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4032,12 +4032,6 @@ static void addrconf_dad_work(struct work_struct *w)
 
 	rtnl_lock();
 
-	/* check if device was taken down before this delayed work
-	 * function could be canceled
-	 */
-	if (idev->dead || !(idev->if_flags & IF_READY))
-		goto out;
-
 	spin_lock_bh(&ifp->lock);
 	if (ifp->state == INET6_IFADDR_STATE_PREDAD) {
 		action = DAD_BEGIN;
@@ -4083,6 +4077,11 @@ static void addrconf_dad_work(struct work_struct *w)
 		goto out;
 
 	write_lock_bh(&idev->lock);
+	if (idev->dead || !(idev->if_flags & IF_READY)) {
+		write_unlock_bh(&idev->lock);
+		goto out;
+	}
+
 	spin_lock(&ifp->lock);
 	if (ifp->state == INET6_IFADDR_STATE_DEAD) {
 		spin_unlock(&ifp->lock);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] Revert "ipv6: Handle race in addrconf_dad_work"
  2019-10-03 21:46 [PATCH net] Revert "ipv6: Handle race in addrconf_dad_work" David Ahern
@ 2019-10-03 21:53 ` Eric Dumazet
  2019-10-04 21:32 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2019-10-03 21:53 UTC (permalink / raw)
  To: David Ahern, davem, jakub.kicinski
  Cc: netdev, rajendra.dendukuri, eric.dumazet, David Ahern, Eric Dumazet



On 10/3/19 2:46 PM, David Ahern wrote:
> From: David Ahern <dsahern@gmail.com>
> 
> This reverts commit a3ce2a21bb8969ae27917281244fa91bf5f286d7.
> 
> Eric reported tests failings with commit. After digging into it,
> the bottom line is that the DAD sequence is not to be messed with.
> There are too many cases that are expected to proceed regardless
> of whether a device is up.
> 
> Revert the patch and I will send a different solution for the
> problem Rajendra reported.
> 
> Signed-off-by: David Ahern <dsahern@gmail.com>
> Cc: Eric Dumazet <edumazet@google.com>

Reviewed-by: Eric Dumazet <edumazet@google.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] Revert "ipv6: Handle race in addrconf_dad_work"
  2019-10-03 21:46 [PATCH net] Revert "ipv6: Handle race in addrconf_dad_work" David Ahern
  2019-10-03 21:53 ` Eric Dumazet
@ 2019-10-04 21:32 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-10-04 21:32 UTC (permalink / raw)
  To: dsahern
  Cc: jakub.kicinski, netdev, rajendra.dendukuri, eric.dumazet,
	dsahern, edumazet

From: David Ahern <dsahern@kernel.org>
Date: Thu,  3 Oct 2019 14:46:15 -0700

> From: David Ahern <dsahern@gmail.com>
> 
> This reverts commit a3ce2a21bb8969ae27917281244fa91bf5f286d7.
> 
> Eric reported tests failings with commit. After digging into it,
> the bottom line is that the DAD sequence is not to be messed with.
> There are too many cases that are expected to proceed regardless
> of whether a device is up.
> 
> Revert the patch and I will send a different solution for the
> problem Rajendra reported.
> 
> Signed-off-by: David Ahern <dsahern@gmail.com>

Applied and the reverted patch removed from the -stable queue.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-04 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03 21:46 [PATCH net] Revert "ipv6: Handle race in addrconf_dad_work" David Ahern
2019-10-03 21:53 ` Eric Dumazet
2019-10-04 21:32 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.