mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-13 22:23:45 +00:00
dde_linux: implement kmem_cache_destroy
Note, this enables more information on wifi-driver error recovery. Issue #5036
This commit is contained in:
parent
4d1e75ce3b
commit
65b619e7b4
@ -457,14 +457,6 @@ void * kmem_cache_alloc_lru(struct kmem_cache * cachep,struct list_lru * lru,gfp
|
||||
}
|
||||
|
||||
|
||||
#include <linux/slab.h>
|
||||
|
||||
void kmem_cache_destroy(struct kmem_cache * s)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
#include <linux/kstrtox.h>
|
||||
|
||||
noinline int kstrtoint(const char * s,unsigned int base,int * res)
|
||||
|
@ -397,14 +397,6 @@ void * kmem_cache_alloc_lru(struct kmem_cache * cachep,struct list_lru * lru,gfp
|
||||
}
|
||||
|
||||
|
||||
#include <linux/slab.h>
|
||||
|
||||
void kmem_cache_destroy(struct kmem_cache * s)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
#include <linux/kstrtox.h>
|
||||
|
||||
noinline int kstrtoint(const char * s,unsigned int base,int * res)
|
||||
|
@ -58,12 +58,31 @@ struct kmem_cache * kmem_cache_create(const char * name,
|
||||
{
|
||||
struct kmem_cache * cache =
|
||||
__kmalloc(sizeof(struct kmem_cache), GFP_KERNEL);
|
||||
cache->size = size;
|
||||
cache->align = align;
|
||||
cache->size = size;
|
||||
cache->align = align;
|
||||
cache->refcount = 1;
|
||||
return cache;
|
||||
}
|
||||
|
||||
|
||||
void kmem_cache_destroy(struct kmem_cache *cache)
|
||||
{
|
||||
if (!cache)
|
||||
return;
|
||||
|
||||
if (!cache->refcount) {
|
||||
printk("%s unexpected case - potential memory leak\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (cache->refcount > 0)
|
||||
cache->refcount --;
|
||||
|
||||
if (!cache->refcount)
|
||||
lx_emul_mem_free(cache);
|
||||
}
|
||||
|
||||
|
||||
void kmem_cache_free(struct kmem_cache * s, void * x)
|
||||
{
|
||||
lx_emul_mem_free(x);
|
||||
|
@ -1562,14 +1562,6 @@ void kill_anon_super(struct super_block * sb)
|
||||
}
|
||||
|
||||
|
||||
#include <linux/slab.h>
|
||||
|
||||
void kmem_cache_destroy(struct kmem_cache * s)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
#include <linux/kmsg_dump.h>
|
||||
|
||||
void kmsg_dump(enum kmsg_dump_reason reason)
|
||||
|
@ -271,14 +271,6 @@ void * kmem_cache_alloc_lru(struct kmem_cache * cachep,struct list_lru * lru,gfp
|
||||
}
|
||||
|
||||
|
||||
#include <linux/slab.h>
|
||||
|
||||
void kmem_cache_destroy(struct kmem_cache * s)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
#include <linux/kobject.h>
|
||||
|
||||
int kobject_synth_uevent(struct kobject * kobj,const char * buf,size_t count)
|
||||
|
@ -635,14 +635,6 @@ void kill_fasync(struct fasync_struct ** fp,int sig,int band)
|
||||
}
|
||||
|
||||
|
||||
#include <linux/slab.h>
|
||||
|
||||
void kmem_cache_destroy(struct kmem_cache * s)
|
||||
{
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
}
|
||||
|
||||
|
||||
#include <linux/kmsg_dump.h>
|
||||
|
||||
void kmsg_dump(enum kmsg_dump_reason reason)
|
||||
|
Loading…
x
Reference in New Issue
Block a user