Linux ocfs2 filesystem development
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access
Date: Tue, 6 Jan 2015 16:09:55 -0800	[thread overview]
Message-ID: <20150106160955.fd10d1aee8a0456fb6dc4846@linux-foundation.org> (raw)
In-Reply-To: <1419486737-16102-1-git-send-email-junxiao.bi@oracle.com>

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?

  parent reply	other threads:[~2015-01-07  0:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-01-07  2:42   ` [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access Junxiao Bi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150106160955.fd10d1aee8a0456fb6dc4846@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox