lkml.org 
[lkml]   [2016]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] orangefs: print debug on op before it is freed by set_op_state_purged
Date
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
\
 
 \ /
  Last update: 2016-03-27 21:41    [W:0.029 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site