Skip to content

Commit 1babdb4

Browse files
teiglandswhiteho
authored andcommitted
[DLM] fix size of STATUS_REPLY message
When the not_ready routine sends a "fake" status reply with blank status flags, it needs to use the correct size for a normal STATUS_REPLY by including the size of the would-be config parameters. We also fill in the non-existant config parameters with an invalid lvblen value so it's easier to notice if these invalid paratmers are ever being used. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
1 parent aed3255 commit 1babdb4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎fs/dlm/rcom.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,10 @@ static void receive_rcom_lock_reply(struct dlm_ls *ls, struct dlm_rcom *rc_in)
370370
static int send_ls_not_ready(int nodeid, struct dlm_rcom *rc_in)
371371
{
372372
struct dlm_rcom *rc;
373+
struct rcom_config *rf;
373374
struct dlm_mhandle *mh;
374375
char *mb;
375-
int mb_len = sizeof(struct dlm_rcom);
376+
int mb_len = sizeof(struct dlm_rcom) + sizeof(struct rcom_config);
376377

377378
mh = dlm_lowcomms_get_buffer(nodeid, mb_len, GFP_KERNEL, &mb);
378379
if (!mh)
@@ -391,6 +392,9 @@ static int send_ls_not_ready(int nodeid, struct dlm_rcom *rc_in)
391392
rc->rc_id = rc_in->rc_id;
392393
rc->rc_result = -ESRCH;
393394

395+
rf = (struct rcom_config *) rc->rc_buf;
396+
rf->rf_lvblen = -1;
397+
394398
dlm_rcom_out(rc);
395399
dlm_lowcomms_commit_buffer(mh);
396400

0 commit comments

Comments
 (0)