Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Oct 2009 02:27:39 +0200
From:      Oliver Pinter <oliver.pntr@gmail.com>
To:        Konstantin Belousov <kib@freebsd.org>
Cc:        svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   Re: svn commit: r197855 - in stable/8/sys: . amd64/include/xen  cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern
Message-ID:  <6101e8c40910101727t632d295ercccde04db34efac3@mail.gmail.com>
In-Reply-To: <200910081128.n98BSWCd021500@svn.freebsd.org>
References:  <200910081128.n98BSWCd021500@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
this like commit MFC to 7-STABLE?

On 10/8/09, Konstantin Belousov <kib@freebsd.org> wrote:
> Author: kib
> Date: Thu Oct  8 11:28:32 2009
> New Revision: 197855
> URL: http://svn.freebsd.org/changeset/base/197855
>
> Log:
>   MFC r197662:
>   Do not dereference vp->v_mount without holding vnode lock and checking
>   that the vnode is not reclaimed.
>
>   Approved by:	re (bz)
>
> Modified:
>   stable/8/sys/   (props changed)
>   stable/8/sys/amd64/include/xen/   (props changed)
>   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
>   stable/8/sys/contrib/dev/acpica/   (props changed)
>   stable/8/sys/contrib/pf/   (props changed)
>   stable/8/sys/dev/xen/xenpci/   (props changed)
>   stable/8/sys/kern/uipc_syscalls.c
>
> Modified: stable/8/sys/kern/uipc_syscalls.c
> ==============================================================================
> --- stable/8/sys/kern/uipc_syscalls.c	Thu Oct  8 11:07:15 2009	(r197854)
> +++ stable/8/sys/kern/uipc_syscalls.c	Thu Oct  8 11:28:32 2009	(r197855)
> @@ -2085,9 +2085,11 @@ retry_space:
>  				/*
>  				 * Get the page from backing store.
>  				 */
> -				bsize = vp->v_mount->mnt_stat.f_iosize;
>  				vfslocked = VFS_LOCK_GIANT(vp->v_mount);
> -				vn_lock(vp, LK_SHARED | LK_RETRY);
> +				error = vn_lock(vp, LK_SHARED);
> +				if (error != 0)
> +					goto after_read;
> +				bsize = vp->v_mount->mnt_stat.f_iosize;
>
>  				/*
>  				 * XXXMAC: Because we don't have fp->f_cred
> @@ -2100,6 +2102,7 @@ retry_space:
>  				    IO_VMIO | ((MAXBSIZE / bsize) << IO_SEQSHIFT),
>  				    td->td_ucred, NOCRED, &resid, td);
>  				VOP_UNLOCK(vp, 0);
> +			after_read:
>  				VFS_UNLOCK_GIANT(vfslocked);
>  				VM_OBJECT_LOCK(obj);
>  				vm_page_io_finish(pg);
> _______________________________________________
> svn-src-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-stable
> To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6101e8c40910101727t632d295ercccde04db34efac3>