Re: [PATCH 2/3] module: remove mod arg from module_free, rename module_memfree().

2015-01-07 Thread Alexei Starovoitov
On Wed, Jan 7, 2015 at 4:58 PM, Rusty Russell wrote: > --- a/kernel/bpf/core.c > +++ b/kernel/bpf/core.c > void bpf_jit_binary_free(struct bpf_binary_header *hdr) > { > - module_free(NULL, hdr); > + module_memfree(hdr); > } ... > -void __weak module_free(struct module *mod, void *mo

[PATCH 2/3] module: remove mod arg from module_free, rename module_memfree().

2015-01-07 Thread Rusty Russell
Nothing needs the module pointer any more, and the next patch will call it from RCU, where the module itself might no longer exist. Removing the arg is the safest approach. This just codifies the use of the module_alloc/module_free pattern which ftrace and bpf use. Signed-off-by: Rusty Russell C