From 1efde3fe9815cd34fd428a28d788ff47475055e7 Mon Sep 17 00:00:00 2001 From: Chesnokov Gleb Date: Wed, 15 Dec 2021 16:50:06 +0300 Subject: [PATCH] Revert "scst: Enable copying to user space from an SGV cache" This reverts commit 0c4f769c0ed38e76d07cc7301077c59e432a342f. --- scst/src/scst_mem.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index 92a8f5c0f..a0bba7662 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -1376,11 +1376,15 @@ static void sgv_pool_init_cache(struct sgv_pool *pool, int cache_num, scnprintf(pool->cache_names[cache_num], sizeof(pool->cache_names[cache_num]), "%s-%uK", pool->name, (pages << PAGE_SHIFT) >> 10); - pool->caches[cache_num] = kmem_cache_create_usercopy( + pool->caches[cache_num] = kmem_cache_create( pool->cache_names[cache_num], size, - /*align=*/0, per_cpu ? SCST_SLAB_FLAGS : - (SCST_SLAB_FLAGS|SLAB_HWCACHE_ALIGN), - /*useroffset=*/0, /*usersize=*/size, /*ctor=*/NULL); + 0, per_cpu ? SCST_SLAB_FLAGS : + (SCST_SLAB_FLAGS|SLAB_HWCACHE_ALIGN), NULL +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)) + , NULL); +#else + ); +#endif return; }