Date: Sun, 6 Dec 2009 22:43:07 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 171473 for review Message-ID: <200912062243.nB6Mh70F089918@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=171473 Change 171473 by mav@mav_mavtest on 2009/12/06 22:42:24 Increase device reference count while we hold freeze on it. Elseway if device disappears, we will unfreeze something unexpected. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#22 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#22 (text+ko) ==== @@ -54,6 +54,7 @@ #include <cam/cam_ccb.h> #include <cam/cam_periph.h> #include <cam/cam_xpt_periph.h> +#include <cam/cam_xpt_internal.h> #include <cam/cam_sim.h> #include <cam/ata/ata_all.h> @@ -178,6 +179,7 @@ i, 0) == CAM_REQ_CMP) { printf("PMP freeze: %d\n", i); softc->frozen |= (1 << i); + xpt_acquire_device(dpath->device); cam_freeze_devq(dpath); xpt_free_path(dpath); } @@ -201,6 +203,7 @@ printf("PMP release: %d\n", i); softc->frozen &= ~(1 << i); cam_release_devq(dpath, 0, 0, 0, FALSE); + xpt_release_device(dpath->device); xpt_free_path(dpath); } } @@ -228,6 +231,7 @@ xpt_free_path(dpath); } } + pmprelease(periph, -1); xpt_print(periph->path, "lost device\n"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912062243.nB6Mh70F089918>