linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org
Subject: [bug report] xfs: connect refcount adjust functions to upper layers
Date: Thu, 15 Dec 2016 15:23:57 +0300	[thread overview]
Message-ID: <20161215122357.GA13876@elgon.mountain> (raw)

Hello Darrick J. Wong,

The patch 33ba61292084: "xfs: connect refcount adjust functions to
upper layers" from Oct 3, 2016, leads to the following static checker
warning:

	fs/xfs/xfs_refcount_item.c:535 xfs_cui_recover()
	warn: passing freed memory 'rcur'

fs/xfs/xfs_refcount_item.c
   523                  }
   524          }
   525  
   526          xfs_refcount_finish_one_cleanup(tp, rcur, error);
                                                    ^^^^
Freed here.

   527          error = xfs_defer_finish(&tp, &dfops, NULL);
   528          if (error)
   529                  goto abort_error;
   530          set_bit(XFS_CUI_RECOVERED, &cuip->cui_flags);
   531          error = xfs_trans_commit(tp);
   532          return error;
   533  
   534  abort_error:
   535          xfs_refcount_finish_one_cleanup(tp, rcur, error);
                                                    ^^^^
Again here...

   536          xfs_defer_cancel(&dfops);
   537          xfs_trans_cancel(tp);
   538          return error;
   539  }

regards,
dan carpenter

             reply	other threads:[~2016-12-15 15:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15 12:23 Dan Carpenter [this message]
2016-12-16  1:46 ` [bug report] xfs: connect refcount adjust functions to upper layers Darrick J. Wong

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=20161215122357.GA13876@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).