Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Feb 2017 05:13:16 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r314026 - stable/10/sys/cam/ctl
Message-ID:  <201702210513.v1L5DGTJ086368@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Feb 21 05:13:16 2017
New Revision: 314026
URL: https://svnweb.freebsd.org/changeset/base/314026

Log:
  MFC r313736: Fix panic on shutdown of ramdisk LU with zero capacity.

Modified:
  stable/10/sys/cam/ctl/ctl_backend_ramdisk.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl_backend_ramdisk.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl_backend_ramdisk.c	Tue Feb 21 05:12:42 2017	(r314025)
+++ stable/10/sys/cam/ctl/ctl_backend_ramdisk.c	Tue Feb 21 05:13:16 2017	(r314026)
@@ -1120,8 +1120,10 @@ ctl_backend_ramdisk_create(struct ctl_be
 
 	STAILQ_INIT(&be_lun->cont_queue);
 	sx_init(&be_lun->page_lock, "cram page lock");
-	if (be_lun->cap_bytes == 0)
+	if (be_lun->cap_bytes == 0) {
+		be_lun->indir = 0;
 		be_lun->pages = malloc(be_lun->pblocksize, M_RAMDISK, M_WAITOK);
+	}
 	be_lun->zero_page = malloc(be_lun->pblocksize, M_RAMDISK,
 	    M_WAITOK|M_ZERO);
 	mtx_init(&be_lun->queue_lock, "cram queue lock", NULL, MTX_DEF);



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