All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] ocfs2: fix sparse file & data ordering issue in direct io
Date: Thu, 17 Nov 2016 13:03:19 +0300	[thread overview]
Message-ID: <20161117100319.GS28558@mwanda> (raw)
In-Reply-To: <96764e72-b2ff-f788-0452-bf3f8cb6b268@suse.com>

On Thu, Nov 17, 2016 at 11:08:08AM +0800, Eric Ren wrote:
> Hi,
> 
> On 11/16/2016 06:45 PM, Dan Carpenter wrote:
> >On Wed, Nov 16, 2016 at 10:33:49AM +0800, Eric Ren wrote:
> >That silences the warning, of course, but I feel like the code is buggy.
> >How do we know that we don't hit that exit path?
> Sorry, I missed your point. Do you mean the below?
> 
> "1817 goto out_quota; " will free (*wc), but with "ret = 0". Thus, the caller
> think it's OK to use (*wc), but...
> 
> Do I understand you correctly?
> 

It doesn't free it.  It frees "wc" but not "*fsdata".  So it leaves it
unintialized on that path.  That's the issue, yes.

It could be that it's impossible to reach that path from here, but it's
not clear to me.

regards,
dan carpenter

  reply	other threads:[~2016-11-17 10:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 10:25 [Ocfs2-devel] ocfs2: fix sparse file & data ordering issue in direct io Dan Carpenter
2016-11-15 10:33 ` Dan Carpenter
2016-11-15 10:36   ` Dan Carpenter
2016-11-16  2:33     ` Eric Ren
2016-11-16 10:45       ` Dan Carpenter
2016-11-17  3:08         ` Eric Ren
2016-11-17 10:03           ` Dan Carpenter [this message]
2016-11-22  2:29             ` Junxiao Bi
2016-11-24 14:21               ` Dan Carpenter
2016-11-17 11:58 ` piaojun
2016-11-19  3:49   ` piaojun

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=20161117100319.GS28558@mwanda \
    --to=dan.carpenter@oracle.com \
    --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 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.