fix for daemon version checking crash on close
upcall_cleanup() is called after every upcall regardless of errors. if we get a CLOSE upcall after a daemon restart, we still call cleanup_close() and crash attempting to access the invalid open state pointer. avoid calling upcall-specific cancel routines for these version mismatch errors Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
6331621924
commit
4ea730c881
1 changed files with 4 additions and 2 deletions
|
|
@ -29,6 +29,8 @@
|
|||
#include "util.h"
|
||||
|
||||
|
||||
#define NFSD_VERSION_MISMATCH 116
|
||||
|
||||
extern const nfs41_upcall_op nfs41_op_mount;
|
||||
extern const nfs41_upcall_op nfs41_op_unmount;
|
||||
extern const nfs41_upcall_op nfs41_op_open;
|
||||
|
|
@ -96,7 +98,7 @@ int upcall_parse(
|
|||
opcode2string(upcall->opcode));
|
||||
if (version != NFS41D_VERSION) {
|
||||
eprintf("received version %d expecting version %d\n", version, NFS41D_VERSION);
|
||||
upcall->status = status = 116;
|
||||
upcall->status = status = NFSD_VERSION_MISMATCH;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
@ -187,7 +189,7 @@ void upcall_cleanup(
|
|||
IN nfs41_upcall *upcall)
|
||||
{
|
||||
const nfs41_upcall_op *op = g_upcall_op_table[upcall->opcode];
|
||||
if (op && op->cleanup)
|
||||
if (op && op->cleanup && upcall->status != NFSD_VERSION_MISMATCH)
|
||||
op->cleanup(upcall);
|
||||
|
||||
if (upcall->state_ref) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue