Patch "[PATCH 026/135] cxlflash: a couple off by one bugs" has been added to the 4.4-stable tree
Subsystems (2)
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 <[email protected]> know about it.
Quoted 1 line
From
c4eae6df9efb902a57ef0282ba6012d05ad53979Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
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.
--- drivers/scsi/cxlflash/superpipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/cxlflash/superpipe.c +2 -2
@@ -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 [email protected] are
queue-4.4/0026-cxlflash-a-couple-off-by-one-bugs.patch