[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1459105792-8899-1-git-send-email-colin.king@canonical.com>
Date: Sun, 27 Mar 2016 20:09:52 +0100
From: Colin King <colin.king@...onical.com>
To: Mike Marshall <hubcap@...ibond.com>,
pvfs2-developers@...wulf-underground.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] orangefs: print debug on op before it is freed by set_op_state_purged
From: Colin Ian King <colin.king@...onical.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@...onical.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
Powered by blists - more mailing lists