Messages in this thread Patch in this message | | | From | Colin King <> | Subject | [PATCH] orangefs: print debug on op before it is freed by set_op_state_purged | Date | Sun, 27 Mar 2016 20:09:52 +0100 |
| |
From: Colin Ian King <colin.king@canonical.com>
static analysis shows that calling gossip_debug on op is problematic because op freed by the previous call to set_op_state_purged. Fix this by printing the debug before freeing op.
Signed-off-by: Colin Ian King <colin.king@canonical.com> --- fs/orangefs/orangefs-mod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/orangefs/orangefs-mod.c b/fs/orangefs/orangefs-mod.c index 6f072a8..95a3730 100644 --- a/fs/orangefs/orangefs-mod.c +++ b/fs/orangefs/orangefs-mod.c @@ -277,13 +277,13 @@ void purge_inprogress_ops(void) next, &htable_ops_in_progress[i], list) { - set_op_state_purged(op); gossip_debug(GOSSIP_DEV_DEBUG, "%s: op:%s: op_state:%d: process:%s:\n", __func__, get_opname_string(op), op->op_state, current->comm); + set_op_state_purged(op); } spin_unlock(&htable_ops_in_progress_lock); } -- 2.7.4
| |