All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Sherry Yang <sherry.yang@oracle.com>
Cc: djwong@kernel.org, dchinner@redhat.com,
	allison.henderson@oracle.com, chandanrlinux@gmail.com,
	bfoster@redhat.com, linux-xfs@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] xfs: initialize error in xfs_defer_finish_one
Date: Tue, 2 Aug 2022 06:49:02 +1000	[thread overview]
Message-ID: <20220801204902.GA3600936@dread.disaster.area> (raw)
In-Reply-To: <20220801190311.65703-1-sherry.yang@oracle.com>

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@fromorbit.com

  reply	other threads:[~2022-08-01 20:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01 19:03 [PATCH v1] xfs: initialize error in xfs_defer_finish_one Sherry Yang
2022-08-01 20:49 ` Dave Chinner [this message]
2022-08-03  4:31   ` Darrick J. Wong
2022-08-03 23:42     ` Sherry Yang
2022-08-04  5:07       ` 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=20220801204902.GA3600936@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=allison.henderson@oracle.com \
    --cc=bfoster@redhat.com \
    --cc=chandanrlinux@gmail.com \
    --cc=dchinner@redhat.com \
    --cc=djwong@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sherry.yang@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.