* [PATCH] xfs: fix uninitialized variable in xfs_scrub_quota
@ 2017-11-27 22:57 Eric Sandeen
2017-11-28 2:20 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2017-11-27 22:57 UTC (permalink / raw)
To: linux-xfs
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>
---
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfs: fix uninitialized variable in xfs_scrub_quota
2017-11-27 22:57 [PATCH] xfs: fix uninitialized variable in xfs_scrub_quota Eric Sandeen
@ 2017-11-28 2:20 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2017-11-28 2:20 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-28 2:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).