Date: Mon, 5 Jan 2009 10:40:20 +0000 (UTC) From: Doug Rabson <dfr@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r186765 - user/dfr/xenhvm/6/sys/dev/xen/blkfront Message-ID: <200901051040.n05AeKmv093658@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901051040.n05AeKmv093658>