svn commit: r272641 - stable/10/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Mon Oct 6 13:29:16 UTC 2014


Author: mav
Date: Mon Oct  6 13:29:15 2014
New Revision: 272641
URL: https://svnweb.freebsd.org/changeset/base/272641

Log:
  MFC r271954:
  Deny ANCHOR flag set without UNMAP flag set in WRITE SAME commands.

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

Modified: stable/10/sys/cam/ctl/ctl.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl.c	Mon Oct  6 13:28:17 2014	(r272640)
+++ stable/10/sys/cam/ctl/ctl.c	Mon Oct  6 13:29:15 2014	(r272641)
@@ -5989,8 +5989,9 @@ ctl_write_same(struct ctl_scsiio *ctsio)
 		break; /* NOTREACHED */
 	}
 
-	/* NDOB flag can be used only together with UNMAP */
-	if ((byte2 & (SWS_NDOB | SWS_UNMAP)) == SWS_NDOB) {
+	/* NDOB and ANCHOR flags can be used only together with UNMAP */
+	if ((byte2 & SWS_UNMAP) == 0 &&
+	    (byte2 & (SWS_NDOB | SWS_ANCHOR)) != 0) {
 		ctl_set_invalid_field(ctsio, /*sks_valid*/ 1,
 		    /*command*/ 1, /*field*/ 1, /*bit_valid*/ 1, /*bit*/ 0);
 		ctl_done((union ctl_io *)ctsio);


More information about the svn-src-stable mailing list