* [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access
@ 2014-12-25 5:52 Junxiao Bi
2014-12-25 5:52 ` [Ocfs2-devel] [PATCH 2/2] ocfs2: fix wrong comment Junxiao Bi
2015-01-07 0:09 ` [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access Andrew Morton
0 siblings, 2 replies; 4+ messages in thread
From: Junxiao Bi @ 2014-12-25 5:52 UTC (permalink / raw)
To: ocfs2-devel
Variable "why" is not yet initialized at line 615, fix it.
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
---
fs/ocfs2/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 3950693..245db4f 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -569,7 +569,7 @@ static int __ocfs2_extend_allocation(struct inode *inode, u32 logical_start,
handle_t *handle = NULL;
struct ocfs2_alloc_context *data_ac = NULL;
struct ocfs2_alloc_context *meta_ac = NULL;
- enum ocfs2_alloc_restarted why;
+ enum ocfs2_alloc_restarted why = RESTART_NONE;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_extent_tree et;
int did_quota = 0;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 2/2] ocfs2: fix wrong comment
2014-12-25 5:52 [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access Junxiao Bi
@ 2014-12-25 5:52 ` Junxiao Bi
2015-01-07 0:09 ` [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access Andrew Morton
1 sibling, 0 replies; 4+ messages in thread
From: Junxiao Bi @ 2014-12-25 5:52 UTC (permalink / raw)
To: ocfs2-devel
O2NET_CONN_IDLE_DELAY is not defined, connection attempts will not be
canceled due to timeout.
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
---
fs/ocfs2/cluster/tcp_internal.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h
index dc02436..b95e7df 100644
--- a/fs/ocfs2/cluster/tcp_internal.h
+++ b/fs/ocfs2/cluster/tcp_internal.h
@@ -107,12 +107,12 @@ struct o2net_node {
struct list_head nn_status_list;
/* connects are attempted from when heartbeat comes up until either hb
- * goes down, the node is unconfigured, no connect attempts succeed
- * before O2NET_CONN_IDLE_DELAY, or a connect succeeds. connect_work
- * is queued from set_nn_state both from hb up and from itself if a
- * connect attempt fails and so can be self-arming. shutdown is
- * careful to first mark the nn such that no connects will be attempted
- * before canceling delayed connect work and flushing the queue. */
+ * goes down, the node is unconfigured, or a connect succeeds.
+ * connect_work is queued from set_nn_state both from hb up and from
+ * itself if a connect attempt fails and so can be self-arming.
+ * shutdown is careful to first mark the nn such that no connects will
+ * be attempted before canceling delayed connect work and flushing the
+ * queue. */
struct delayed_work nn_connect_work;
unsigned long nn_last_connect_attempt;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access
2014-12-25 5:52 [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access Junxiao Bi
2014-12-25 5:52 ` [Ocfs2-devel] [PATCH 2/2] ocfs2: fix wrong comment Junxiao Bi
@ 2015-01-07 0:09 ` Andrew Morton
2015-01-07 2:42 ` Junxiao Bi
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2015-01-07 0:09 UTC (permalink / raw)
To: ocfs2-devel
On Thu, 25 Dec 2014 13:52:16 +0800 Junxiao Bi <junxiao.bi@oracle.com> wrote:
> Variable "why" is not yet initialized at line 615, fix it.
>
> ...
>
> --- a/fs/ocfs2/file.c
> +++ b/fs/ocfs2/file.c
> @@ -569,7 +569,7 @@ static int __ocfs2_extend_allocation(struct inode *inode, u32 logical_start,
> handle_t *handle = NULL;
> struct ocfs2_alloc_context *data_ac = NULL;
> struct ocfs2_alloc_context *meta_ac = NULL;
> - enum ocfs2_alloc_restarted why;
> + enum ocfs2_alloc_restarted why = RESTART_NONE;
> struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
> struct ocfs2_extent_tree et;
> int did_quota = 0;
Oh geeze, are you really sure about this? __ocfs2_extend_allocation()
is as clear as mud. What happens when ocfs2_add_inode_data() returns
-EAGAIN and leaves *reason_ret unwritten to?
What are the runtime effects of this bug?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access
2015-01-07 0:09 ` [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access Andrew Morton
@ 2015-01-07 2:42 ` Junxiao Bi
0 siblings, 0 replies; 4+ messages in thread
From: Junxiao Bi @ 2015-01-07 2:42 UTC (permalink / raw)
To: ocfs2-devel
On 01/07/2015 08:09 AM, Andrew Morton wrote:
> On Thu, 25 Dec 2014 13:52:16 +0800 Junxiao Bi <junxiao.bi@oracle.com> wrote:
>
>> Variable "why" is not yet initialized at line 615, fix it.
>>
>> ...
>>
>> --- a/fs/ocfs2/file.c
>> +++ b/fs/ocfs2/file.c
>> @@ -569,7 +569,7 @@ static int __ocfs2_extend_allocation(struct inode *inode, u32 logical_start,
>> handle_t *handle = NULL;
>> struct ocfs2_alloc_context *data_ac = NULL;
>> struct ocfs2_alloc_context *meta_ac = NULL;
>> - enum ocfs2_alloc_restarted why;
>> + enum ocfs2_alloc_restarted why = RESTART_NONE;
>> struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
>> struct ocfs2_extent_tree et;
>> int did_quota = 0;
>
> Oh geeze, are you really sure about this? __ocfs2_extend_allocation()
> is as clear as mud. What happens when ocfs2_add_inode_data() returns
> -EAGAIN and leaves *reason_ret unwritten to?
*reason_ret will always be written when ocfs2_add_inode_data() return.
>
> What are the runtime effects of this bug?
I didn't see any other effects except a compile warning and an
uninitialized variable from the tracepoint.
Thanks,
Junxiao.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-07 2:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-25 5:52 [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access Junxiao Bi
2014-12-25 5:52 ` [Ocfs2-devel] [PATCH 2/2] ocfs2: fix wrong comment Junxiao Bi
2015-01-07 0:09 ` [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access Andrew Morton
2015-01-07 2:42 ` Junxiao Bi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.