From 641bb3246dbb64c0b4a0b6dfa6a024e82c155533 Mon Sep 17 00:00:00 2001 From: Martin Brandenburg Date: Mon, 28 Mar 2016 17:18:27 -0400 Subject: [PATCH 1/2] orangefs: don't put readdir slot twice This was quite an oversight. After a readdir, the module could not be unloaded, the number of slots is wrong, and memory near the slot bitmap is possibly corrupt. Oops. Signed-off-by: Martin Brandenburg --- fs/orangefs/dir.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/orangefs/dir.c b/fs/orangefs/dir.c index f30b6ecacdd1..ba7dec40771e 100644 --- a/fs/orangefs/dir.c +++ b/fs/orangefs/dir.c @@ -235,7 +235,7 @@ get_new_buffer_index: if (ret == -EIO && op_state_purged(new_op)) { gossip_err("%s: Client is down. Aborting readdir call.\n", __func__); - goto out_slot; + goto out_free_op; } if (ret < 0 || new_op->downcall.status != 0) { @@ -244,14 +244,14 @@ get_new_buffer_index: new_op->downcall.status); if (ret >= 0) ret = new_op->downcall.status; - goto out_slot; + goto out_free_op; } dents_buf = new_op->downcall.trailer_buf; if (dents_buf == NULL) { gossip_err("Invalid NULL buffer in readdir response\n"); ret = -ENOMEM; - goto out_slot; + goto out_free_op; } bytes_decoded = decode_dirents(dents_buf, new_op->downcall.trailer_size, @@ -363,8 +363,6 @@ out_destroy_handle: out_vfree: gossip_debug(GOSSIP_DIR_DEBUG, "vfree %p\n", dents_buf); vfree(dents_buf); -out_slot: - orangefs_readdir_index_put(buffer_index); out_free_op: op_release(new_op); gossip_debug(GOSSIP_DIR_DEBUG, "orangefs_readdir returning %d\n", ret); From 878dfd3210e0bfc047995022de3091724ea9a5f6 Mon Sep 17 00:00:00 2001 From: Martin Brandenburg Date: Wed, 30 Mar 2016 16:18:43 -0400 Subject: [PATCH 2/2] orangefs: minimum userspace version is 2.9.3 Version 2.9.4 isn't even released yet. Signed-off-by: Martin Brandenburg --- fs/orangefs/protocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/orangefs/protocol.h b/fs/orangefs/protocol.h index 45ce4ff4cbc7..50578a28bd9e 100644 --- a/fs/orangefs/protocol.h +++ b/fs/orangefs/protocol.h @@ -407,7 +407,7 @@ enum { * space. Zero signifies the upstream version of the kernel module. */ #define ORANGEFS_KERNEL_PROTO_VERSION 0 -#define ORANGEFS_MINIMUM_USERSPACE_VERSION 20904 +#define ORANGEFS_MINIMUM_USERSPACE_VERSION 20903 /* * describes memory regions to map in the ORANGEFS_DEV_MAP ioctl.