[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220801204902.GA3600936@dread.disaster.area>
Date: Tue, 2 Aug 2022 06:49:02 +1000
From: Dave Chinner <david@...morbit.com>
To: Sherry Yang <sherry.yang@...cle.com>
Cc: djwong@...nel.org, dchinner@...hat.com,
allison.henderson@...cle.com, chandanrlinux@...il.com,
bfoster@...hat.com, linux-xfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] xfs: initialize error in xfs_defer_finish_one
On Mon, Aug 01, 2022 at 12:03:11PM -0700, Sherry Yang wrote:
> Path through non-void function 'xfs_defer_finish_one' may return error
> uninitialized if no iteration of 'list_for_each_safe' occurs. Fix this
> by initializing error.
I didn't think this situation was possible - how do we get deferred
work queued with no work items on it?
If we can return an uninitialised error from xfs_defer_finish_one()
because of an empty queued work, then something else has gone wrong
earlier in the work deferral process. If this can actually happen,
then we need to fix whatever is creating the empty work rather than
paper over it by initialising the error being returned for empty
works...
Cheers,
Dave.
--
Dave Chinner
david@...morbit.com
Powered by blists - more mailing lists