Subject: CVS commit: src/sys/arch/xen/xen
To: None <source-changes@NetBSD.org>
From: Manuel Bouyer <bouyer@netbsd.org>
List: source-changes
Date: 11/14/2006 22:14:57
Module Name:	src
Committed By:	bouyer
Date:		Tue Nov 14 22:14:57 UTC 2006

Modified Files:
	src/sys/arch/xen/xen: xbdback.c xbdback_xenbus.c

Log Message:
vn_lock() the vnode we got from bdevvp(), otherwise if something else uses
this device in userland (e.g. qemu-dm when running a HVM guest), we'll reuse
the existing vnode and we'll panic in VOP_UNLOCK(). We don't have this issue
most of the time because when xbdback is the only user, we get a specfs
vnode for which locking operation are NOPs.

Thanks to Antti Kantee for spotting the missing vn_lock() in sources and
giving details about vnode locking.


To generate a diff of this commit:
cvs rdiff -r1.21 -r1.22 src/sys/arch/xen/xen/xbdback.c
cvs rdiff -r1.2 -r1.3 src/sys/arch/xen/xen/xbdback_xenbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.