From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [bug report] xfs: connect refcount adjust functions to upper layers
Date: Thu, 15 Dec 2016 17:46:42 -0800 [thread overview]
Message-ID: <20161216014642.GI5357@birch.djwong.org> (raw)
In-Reply-To: <20161215122357.GA13876@elgon.mountain>
On Thu, Dec 15, 2016 at 03:23:57PM +0300, Dan Carpenter wrote:
> 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...
Yep, definitely a bug. I'll make a fix.
--D
>
> 536 xfs_defer_cancel(&dfops);
> 537 xfs_trans_cancel(tp);
> 538 return error;
> 539 }
>
> regards,
> dan carpenter
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2016-12-16 1:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-15 12:23 [bug report] xfs: connect refcount adjust functions to upper layers Dan Carpenter
2016-12-16 1:46 ` Darrick J. Wong [this message]
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=20161216014642.GI5357@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=dan.carpenter@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 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.