Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 2017 17:58:08 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315205 - head/sys/dev/isci/scil
Message-ID:  <201703131758.v2DHw8NC071840@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Mon Mar 13 17:58:08 2017
New Revision: 315205
URL: https://svnweb.freebsd.org/changeset/base/315205

Log:
  scif_sas_controller: Fix inverted logic range check
  
  PR:		217742
  Submitted by:	Svyatoslav <razmyslov at viva64.com>
  Sponsored by:	Viva64 (PVS-Studio)

Modified:
  head/sys/dev/isci/scil/scif_sas_controller.c

Modified: head/sys/dev/isci/scil/scif_sas_controller.c
==============================================================================
--- head/sys/dev/isci/scil/scif_sas_controller.c	Mon Mar 13 17:53:46 2017	(r315204)
+++ head/sys/dev/isci/scil/scif_sas_controller.c	Mon Mar 13 17:58:08 2017	(r315205)
@@ -528,7 +528,7 @@ SCI_STATUS scif_user_parameters_set(
    if (scif_parms->sas.is_sata_ncq_enabled != 1 && scif_parms->sas.is_sata_ncq_enabled != 0)
       return SCI_FAILURE_INVALID_PARAMETER_VALUE;
 
-   if (scif_parms->sas.max_ncq_depth < 1 && scif_parms->sas.max_ncq_depth > 32)
+   if (scif_parms->sas.max_ncq_depth < 1 || scif_parms->sas.max_ncq_depth > 32)
       return SCI_FAILURE_INVALID_PARAMETER_VALUE;
 
    if (scif_parms->sas.is_sata_standby_timer_enabled != 1



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