Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 May 2020 11:10:45 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r360842 - stable/11/sys/dev/isci/scil
Message-ID:  <202005091110.049BAjJN068369@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat May  9 11:10:44 2020
New Revision: 360842
URL: https://svnweb.freebsd.org/changeset/base/360842

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

Modified:
  stable/11/sys/dev/isci/scil/scif_sas_controller.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/isci/scil/scif_sas_controller.c
==============================================================================
--- stable/11/sys/dev/isci/scil/scif_sas_controller.c	Sat May  9 10:55:34 2020	(r360841)
+++ stable/11/sys/dev/isci/scil/scif_sas_controller.c	Sat May  9 11:10:44 2020	(r360842)
@@ -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?202005091110.049BAjJN068369>