Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Aug 2016 07:54:54 -0700
From:      Conrad Meyer <cem@freebsd.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r303869 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <CAG6CVpVdO7DfQzgCCX4opUfGaP93%2BKqUs5fndnseogt1E=O%2BOA@mail.gmail.com>
In-Reply-To: <201608090611.u796BP4S064574@repo.freebsd.org>
References:  <201608090611.u796BP4S064574@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This was detected by Coverity as CID 1361483, for what it's worth.

Best,
Conrad

On Mon, Aug 8, 2016 at 11:11 PM, Andriy Gapon <avg@freebsd.org> wrote:
> Author: avg
> Date: Tue Aug  9 06:11:24 2016
> New Revision: 303869
> URL: https://svnweb.freebsd.org/changeset/base/303869
>
> Log:
>   fix a zfs cross-device rename crash introduced in r303763
>
>   The problem was that 'zfsvfs' variable was not initialized if the error
>   was detected, but in the exit path the variable was dereferenced before
>   the error code was checked.
>
>   Reported by:  np
>   MFC after:    3 days
>   X-MFC with:   r303763
>
> Modified:
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
>
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
> ==============================================================================
> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c     Tue Aug  9 04:59:55 2016        (r303868)
> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c     Tue Aug  9 06:11:24 2016        (r303869)
> @@ -3956,7 +3956,7 @@ unlockout:                        /* all 4 vnodes are locked,
>         VOP_UNLOCK(sdvp, 0);
>
>  out:                           /* original two vnodes are locked */
> -       if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS && error == 0)
> +       if (error == 0 && zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
>                 zil_commit(zilog, 0);
>
>         if (*tvpp != NULL)
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpVdO7DfQzgCCX4opUfGaP93%2BKqUs5fndnseogt1E=O%2BOA>