From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: fix uninitialized variable in xfs_scrub_quota
Date: Mon, 27 Nov 2017 18:20:14 -0800 [thread overview]
Message-ID: <20171128022014.GD21412@magnolia> (raw)
In-Reply-To: <8ac42102-7147-a373-5e2c-a984e1bdbe00@redhat.com>
On Mon, Nov 27, 2017 at 04:57:36PM -0600, Eric Sandeen wrote:
> On the first pass through the while(1) loop, we get to
> xfs_scrub_should_terminate() which can test the uninitialized
> error variable.
>
> Fixes-coverity-id: 1423737
> Fixes: c2fc338c ("xfs: scrub quota information")
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Looks ok, will test...
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>
> compile-tested only
>
> diff --git a/fs/xfs/scrub/quota.c b/fs/xfs/scrub/quota.c
> index 8e58ba8..613def9 100644
> --- a/fs/xfs/scrub/quota.c
> +++ b/fs/xfs/scrub/quota.c
> @@ -207,7 +207,7 @@
> xfs_dqid_t id = 0;
> uint dqtype;
> int nimaps;
> - int error;
> + int error = 0;
>
> if (!XFS_IS_QUOTA_RUNNING(mp) || !XFS_IS_QUOTA_ON(mp))
> return -ENOENT;
>
> --
> 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:[~2017-11-28 2:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 22:57 [PATCH] xfs: fix uninitialized variable in xfs_scrub_quota Eric Sandeen
2017-11-28 2:20 ` 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=20171128022014.GD21412@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.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.