ocfs2: Fix NULL pointer dereferences in o2net
commitcdef59a94c2fc962ada379d4240d556db7b56d55
authorTao Ma <tao.ma@oracle.com>
Wed, 5 Mar 2008 07:49:55 +0000 (5 15:49 +0800)
committerMark Fasheh <mark.fasheh@oracle.com>
Mon, 10 Mar 2008 22:14:19 +0000 (10 15:14 -0700)
tree80abc337bb85896eca55e789f7ebf2c5af4d1fee
parentc824c3c723f2e37a00b3b739a55b28de595fd72e
ocfs2: Fix NULL pointer dereferences in o2net

In some situations, ocfs2_set_nn_state might get called with sc = NULL and
valid = 0. If sc = NULL, we can't dereference it to get the o2nm_node
member. Instead, do what o2net_initialize_handshake does and use NULL when
calling o2net_reconnect_delay and o2net_idle_timeout.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
fs/ocfs2/cluster/tcp.c