Date: Mon, 22 Sep 2014 10:46:07 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271954 - head/sys/cam/ctl Message-ID: <201409221046.s8MAk7qQ006267@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Mon Sep 22 10:46:06 2014 New Revision: 271954 URL: http://svnweb.freebsd.org/changeset/base/271954 Log: Deny ANCHOR flag set without UNMAP flag set in WRITE SAME commands. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Sep 22 10:21:42 2014 (r271953) +++ head/sys/cam/ctl/ctl.c Mon Sep 22 10:46:06 2014 (r271954) @@ -5987,8 +5987,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409221046.s8MAk7qQ006267>