File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -294,12 +294,13 @@ int kmem_cache_shrink(struct kmem_cache *s);
294
294
* To whitelist a single field for copying to/from usercopy, use this
295
295
* macro instead for KMEM_CACHE() above.
296
296
*/
297
- #define KMEM_CACHE_USERCOPY (__struct , __flags , __field ) \
298
- kmem_cache_create_usercopy(#__struct, \
299
- sizeof(struct __struct), \
300
- __alignof__(struct __struct), (__flags), \
301
- offsetof(struct __struct, __field), \
302
- sizeof_field(struct __struct, __field), NULL)
297
+ #define KMEM_CACHE_USERCOPY (__struct , __flags , __field ) \
298
+ __kmem_cache_create_args(#__struct, sizeof(struct __struct), \
299
+ &(struct kmem_cache_args) { \
300
+ .align = __alignof__(struct __struct), \
301
+ .useroffset = offsetof(struct __struct, __field), \
302
+ .usersize = sizeof_field(struct __struct, __field), \
303
+ }, (__flags))
303
304
304
305
/*
305
306
* Common kmalloc functions provided by all allocators
You can’t perform that action at this time.
0 commit comments