]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/tipc/socket.c
tipc: Fix tipc_sk_reinit handling of -EAGAIN
[karo-tx-linux.git] / net / tipc / socket.c
index 101e3597338f7c1e182c9090af0d14caf5be1b8b..d50edd6e00196af04ee7a4011d6339b100cb3537 100644 (file)
@@ -2255,8 +2255,8 @@ void tipc_sk_reinit(struct net *net)
 
        do {
                tsk = ERR_PTR(rhashtable_walk_start(&iter));
-               if (tsk)
-                       continue;
+               if (IS_ERR(tsk))
+                       goto walk_stop;
 
                while ((tsk = rhashtable_walk_next(&iter)) && !IS_ERR(tsk)) {
                        spin_lock_bh(&tsk->sk.sk_lock.slock);
@@ -2265,7 +2265,7 @@ void tipc_sk_reinit(struct net *net)
                        msg_set_orignode(msg, tn->own_addr);
                        spin_unlock_bh(&tsk->sk.sk_lock.slock);
                }
-
+walk_stop:
                rhashtable_walk_stop(&iter);
        } while (tsk == ERR_PTR(-EAGAIN));
 }