On Thu, 2015-07-23 at 22:33 +0200, David Disseldorp wrote: > COMPARE AND WRITE requests should fail if DPO or FUA is set, but the > device is not advertising support. > > Signed-off-by: David Disseldorp <ddiss@xxxxxxx> > --- > drivers/target/target_core_sbc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c > index e318ddb..751b935 100644 > --- a/drivers/target/target_core_sbc.c > +++ b/drivers/target/target_core_sbc.c > @@ -960,6 +960,9 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) > " than 1\n", sectors); > return TCM_INVALID_CDB_FIELD; > } > + if (sbc_check_dpofua(dev, cmd, cdb)) > + return TCM_INVALID_CDB_FIELD; > + > /* > * Double size because we have two buffers, note that > * zero is not an error.. Looks fine. Applied as target-pending/for-next code. Thanks David. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html