Blob Blame History Raw
From: Al Viro <viro@zeniv.linux.org.uk>
Date: Fri, 29 Sep 2017 13:58:09 -0400
Subject: [PATCH] cxlflash: get rid of pointless access_ok()
References: bsc#1077989
Git-commit: a0dbef33863349de5313dff62982d309ded98190
Patch-mainline: v4.15-rc1

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/cxlflash/main.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index 0b6467206f8e..8f609ef9282a 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -3384,12 +3384,6 @@ static int cxlflash_afu_debug(struct cxlflash_cfg *cfg,
 			goto out;
 		}
 
-		if (unlikely(!access_ok(is_write ? VERIFY_READ : VERIFY_WRITE,
-					ubuf, ulen))) {
-			rc = -EFAULT;
-			goto out;
-		}
-
 		buf = kmalloc(ulen + cache_line_size() - 1, GFP_KERNEL);
 		if (unlikely(!buf)) {
 			rc = -ENOMEM;
-- 
2.12.3