From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:34242 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014AbcIINi7 (ORCPT ); Fri, 9 Sep 2016 09:38:59 -0400 Subject: Patch "[PATCH 026/135] cxlflash: a couple off by one bugs" has been added to the 4.4-stable tree To: dan.carpenter@oracle.com, alexander.levin@verizon.com, gregkh@linuxfoundation.org, jthumshirn@suse.de, manoj@linux.vnet.ibm.com, martin.petersen@oracle.com, mrochs@linux.vnet.ibm.com Cc: , From: Date: Fri, 09 Sep 2016 15:37:56 +0200 Message-ID: <1473428276206171@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled [PATCH 026/135] cxlflash: a couple off by one bugs to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: 0026-cxlflash-a-couple-off-by-one-bugs.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From c4eae6df9efb902a57ef0282ba6012d05ad53979 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 2 Dec 2015 17:26:28 -0600 Subject: [PATCH 026/135] cxlflash: a couple off by one bugs [ Upstream commit e37390bee6fe7dfbe507a9d50cdc11344b53fa08 ] The "> MAX_CONTEXT" should be ">= MAX_CONTEXT". Otherwise we go one step beyond the end of the cfg->ctx_tbl[] array. Signed-off-by: Dan Carpenter Reviewed-by: Manoj Kumar Reviewed-by: Johannes Thumshirn Acked-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/cxlflash/superpipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/scsi/cxlflash/superpipe.c +++ b/drivers/scsi/cxlflash/superpipe.c @@ -1380,7 +1380,7 @@ static int cxlflash_disk_attach(struct s } ctxid = cxl_process_element(ctx); - if (unlikely((ctxid > MAX_CONTEXT) || (ctxid < 0))) { + if (unlikely((ctxid >= MAX_CONTEXT) || (ctxid < 0))) { dev_err(dev, "%s: ctxid (%d) invalid!\n", __func__, ctxid); rc = -EPERM; goto err2; @@ -1508,7 +1508,7 @@ static int recover_context(struct cxlfla } ctxid = cxl_process_element(ctx); - if (unlikely((ctxid > MAX_CONTEXT) || (ctxid < 0))) { + if (unlikely((ctxid >= MAX_CONTEXT) || (ctxid < 0))) { dev_err(dev, "%s: ctxid (%d) invalid!\n", __func__, ctxid); rc = -EPERM; goto err1; Patches currently in stable-queue which might be from dan.carpenter@oracle.com are queue-4.4/0026-cxlflash-a-couple-off-by-one-bugs.patch