Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jun 2012 11:07:01 +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-9@freebsd.org
Subject:   svn commit: r237639 - stable/9/sys/cam
Message-ID:  <201206271107.q5RB71nK006674@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Jun 27 11:07:01 2012
New Revision: 237639
URL: http://svn.freebsd.org/changeset/base/237639

Log:
  MFC r237401:
  Make cam_periph_hold() behavior consistent: drop taken reference and
  return ENXIO if periph was invalidated while we were waiting for it.

Modified:
  stable/9/sys/cam/cam_periph.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cam/cam_periph.c
==============================================================================
--- stable/9/sys/cam/cam_periph.c	Wed Jun 27 11:04:04 2012	(r237638)
+++ stable/9/sys/cam/cam_periph.c	Wed Jun 27 11:07:01 2012	(r237639)
@@ -440,6 +440,10 @@ cam_periph_hold(struct cam_periph *perip
 			cam_periph_release_locked(periph);
 			return (error);
 		}
+		if (periph->flags & CAM_PERIPH_INVALID) {
+			cam_periph_release_locked(periph);
+			return (ENXIO);
+		}
 	}
 
 	periph->flags |= CAM_PERIPH_LOCKED;



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