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 <carsten.aulbert@aei.mpg.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7429 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2018-07-21 05:06:35 +00:00
parent b746591148
commit 27354d06e9

View File

@@ -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);