1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
--- a/kernel/nv.c 2015-01-19 01:04:52.529752767 +0000
+++ b/kernel/nv.c 2015-01-19 01:06:48.772876992 +0000
@@ -713,11 +713,12 @@
#if defined(KM_CHECKER)
NV_SPIN_LOCK_INIT(&km_lock);
#endif
nvidia_stack_t_cache = NV_KMEM_CACHE_CREATE(nvidia_stack_cache_name,
- nvidia_stack_t);
+ nvidia_stack_t,
+ SLAB_USERCOPY);
if (nvidia_stack_t_cache == NULL)
{
nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
rc = -ENOMEM;
goto failed4;
@@ -855,7 +855,8 @@ int __init nvidia_init_module(void)
nv_state_init_gpu_uuid_cache(nv);
nvidia_pte_t_cache = NV_KMEM_CACHE_CREATE(nvidia_pte_cache_name,
- nvidia_pte_t);
+ nvidia_pte_t,
+ 0);
if (nvidia_pte_t_cache == NULL)
{
rc = -ENOMEM;
@@ -866,7 +867,8 @@ int __init nvidia_init_module(void)
if (!nv_multiple_kernel_modules)
{
nvidia_p2p_page_t_cache = NV_KMEM_CACHE_CREATE(nvidia_p2p_page_cache_name,
- nvidia_p2p_page_t);
+ nvidia_p2p_page_t,
+ 0);
if (nvidia_p2p_page_t_cache == NULL)
{
rc = -ENOMEM;
--- a/kernel/nv-linux.h 2015-01-19 01:04:52.526419343 +0000
+++ b/kernel/nv-linux.h 2015-01-19 01:05:23.843928675 +0000
@@ -1445,14 +1445,14 @@
extern void *nvidia_stack_t_cache;
#if !defined(NV_VMWARE)
#if (NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT == 5)
-#define NV_KMEM_CACHE_CREATE(name, type) \
- kmem_cache_create(name, sizeof(type), 0, 0, NULL)
+#define NV_KMEM_CACHE_CREATE(name, type, flags) \
+ kmem_cache_create(name, sizeof(type), 0, flags, NULL)
#else
-#define NV_KMEM_CACHE_CREATE(name, type) \
- kmem_cache_create(name, sizeof(type), 0, 0, NULL, \
+#define NV_KMEM_CACHE_CREATE(name, type, flags) \
+ kmem_cache_create(name, sizeof(type), 0, flags, NULL, \
NULL)
#endif
#define NV_KMEM_CACHE_DESTROY(kmem_cache) \
kmem_cache_destroy(kmem_cache)
|