need to check valid opcode value before refcounting state and root
This commit is contained in:
parent
18797690a6
commit
912f6ae500
1 changed files with 4 additions and 5 deletions
|
|
@ -110,16 +110,15 @@ int upcall_parse(
|
|||
upcall->status = status = NFSD_VERSION_MISMATCH;
|
||||
goto out;
|
||||
}
|
||||
if (upcall->root_ref != INVALID_HANDLE_VALUE)
|
||||
nfs41_root_ref(upcall->root_ref);
|
||||
if (upcall->state_ref != INVALID_HANDLE_VALUE)
|
||||
nfs41_open_state_ref(upcall->state_ref);
|
||||
|
||||
if (upcall->opcode >= g_upcall_op_table_size) {
|
||||
status = ERROR_NOT_SUPPORTED;
|
||||
eprintf("unrecognized upcall opcode %d!\n", upcall->opcode);
|
||||
goto out;
|
||||
}
|
||||
if (upcall->root_ref != INVALID_HANDLE_VALUE)
|
||||
nfs41_root_ref(upcall->root_ref);
|
||||
if (upcall->state_ref != INVALID_HANDLE_VALUE)
|
||||
nfs41_open_state_ref(upcall->state_ref);
|
||||
|
||||
/* parse the operation's arguments */
|
||||
op = g_upcall_op_table[upcall->opcode];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue