linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] xfs: connect refcount adjust functions to upper layers
@ 2016-12-15 12:23 Dan Carpenter
  2016-12-16  1:46 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-12-15 12:23 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-16  1:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).