]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
dlm: fix rcom_names message to self
authorDavid Teigland <teigland@redhat.com>
Thu, 21 Feb 2008 19:39:57 +0000 (13:39 -0600)
committerDavid Teigland <teigland@redhat.com>
Thu, 21 Feb 2008 21:19:54 +0000 (15:19 -0600)
The recent patch to validate data lengths in rcom_names messages
failed to account for fake messages a node directs to itself before
ever sending it.  In this case we need to fill in the message length
in the header for the validation code to use.

Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/rcom.c

index 035e6f9990b06b74a72e2511a6025c29dc7fafc4..67522c268c14972d20fb9825de128ff66aa2b2a9 100644 (file)
@@ -215,6 +215,8 @@ int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name, int last_len)
        ls->ls_recover_nodeid = nodeid;
 
        if (nodeid == dlm_our_nodeid()) {
+               ls->ls_recover_buf->rc_header.h_length =
+                       dlm_config.ci_buffer_size;
                dlm_copy_master_names(ls, last_name, last_len,
                                      ls->ls_recover_buf->rc_buf,
                                      max_size, nodeid);