svn commit: r186765 - user/dfr/xenhvm/6/sys/dev/xen/blkfront

Doug Rabson dfr at FreeBSD.org
Mon Jan 5 02:40:20 PST 2009


Author: dfr
Date: Mon Jan  5 10:40:19 2009
New Revision: 186765
URL: http://svn.freebsd.org/changeset/base/186765

Log:
  Don't crash on resume if there is a blkfront instance which failed to
  initialise before the suspend. This happens in HVM mode for DVD devices
  which are handled by the emulator, not blkfront.

Modified:
  user/dfr/xenhvm/6/sys/dev/xen/blkfront/blkfront.c

Modified: user/dfr/xenhvm/6/sys/dev/xen/blkfront/blkfront.c
==============================================================================
--- user/dfr/xenhvm/6/sys/dev/xen/blkfront/blkfront.c	Mon Jan  5 08:56:45 2009	(r186764)
+++ user/dfr/xenhvm/6/sys/dev/xen/blkfront/blkfront.c	Mon Jan  5 10:40:19 2009	(r186765)
@@ -1031,6 +1031,9 @@ blkif_recover(struct blkfront_info *info
 	blkif_request_t *req;
 	struct blk_shadow *copy;
 
+	if (!info->sc)
+		return;
+
 	/* Stage 1: Make a safe copy of the shadow state. */
 	copy = (struct blk_shadow *)malloc(sizeof(info->shadow), M_DEVBUF, M_NOWAIT|M_ZERO);
 	memcpy(copy, info->shadow, sizeof(info->shadow));


More information about the svn-src-user mailing list