From 27354d06e993019a3ee59b8e8dff57eedeea2b5f Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 21 Jul 2018 05:06:35 +0000 Subject: [PATCH] isert-scst: Allow copying between userspace and isert_cmnd data structures This patch avoids that the kernel reports the following: kernel: usercopy: Kernel memory exposure attempt detected from SLUB object 'isert_cmnd' (offset 208, size 48)! Reported-by: Carsten Aulbert git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7429 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/iser_global.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iscsi-scst/kernel/isert-scst/iser_global.c b/iscsi-scst/kernel/isert-scst/iser_global.c index cee6398a0..fc64702cb 100644 --- a/iscsi-scst/kernel/isert-scst/iser_global.c +++ b/iscsi-scst/kernel/isert-scst/iser_global.c @@ -144,7 +144,7 @@ int isert_global_init(void) return -ENOMEM; } - isert_cmnd_cache = KMEM_CACHE(isert_cmnd, + isert_cmnd_cache = KMEM_CACHE_USERCOPY(isert_cmnd, SCST_SLAB_FLAGS|SLAB_HWCACHE_ALIGN); if (!isert_cmnd_cache) { destroy_workqueue(isert_glob.conn_wq);