Showing error 1873

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: fs/ocfs2/cluster/tcp.c
Line in file: 1631
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

1601                     ret, NIPQUAD(mynode->nd_ipv4_address));
1602                goto out;
1603        }
1604
1605        ret = o2net_set_nodelay(sc->sc_sock);
1606        if (ret) {
1607                mlog(ML_ERROR, "setting TCP_NODELAY failed with %d\n", ret);
1608                goto out;
1609        }
1610
1611        o2net_register_callbacks(sc->sc_sock->sk, sc);
1612
1613        spin_lock(&nn->nn_lock);
1614        /* handshake completion will set nn->nn_sc_valid */
1615        o2net_set_nn_state(nn, sc, 0, 0);
1616        spin_unlock(&nn->nn_lock);
1617
1618        remoteaddr.sin_family = AF_INET;
1619        remoteaddr.sin_addr.s_addr = node->nd_ipv4_address;
1620        remoteaddr.sin_port = node->nd_ipv4_port;
1621
1622        ret = sc->sc_sock->ops->connect(sc->sc_sock,
1623                                        (struct sockaddr *)&remoteaddr,
1624                                        sizeof(remoteaddr),
1625                                        O_NONBLOCK);
1626        if (ret == -EINPROGRESS)
1627                ret = 0;
1628
1629out:
1630        if (ret) {
1631                mlog(ML_NOTICE, "connect attempt to " SC_NODEF_FMT " failed "
1632                     "with errno %d\n", SC_NODEF_ARGS(sc), ret);
1633                /* 0 err so that another will be queued and attempted
1634                 * from set_nn_state */
1635                if (sc)
1636                        o2net_ensure_shutdown(nn, sc, 0);
1637        }
1638        if (sc)
1639                sc_put(sc);
1640        if (node)
1641                o2nm_node_put(node);
Show full sources