forked from rubenslte/android_kernel_samsung_msm8226
Merge tag 'v3.4.113' into lineage-16.0
This is the 3.4.113 stable release Change-Id: I80791430656359c5447a675cbff4431362d18df0 Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
This commit is contained in:
committed by
Francescodario Cuzzocrea
parent
36738e5d0d
commit
238a0fb5ad
+29
-13
@@ -969,11 +969,15 @@ void symbol_put_addr(void *addr)
|
||||
if (core_kernel_text(a))
|
||||
return;
|
||||
|
||||
/* module_text_address is safe here: we're supposed to have reference
|
||||
* to module from symbol_get, so it can't go away. */
|
||||
/*
|
||||
* Even though we hold a reference on the module; we still need to
|
||||
* disable preemption in order to safely traverse the data structure.
|
||||
*/
|
||||
preempt_disable();
|
||||
modaddr = __module_text_address(a);
|
||||
BUG_ON(!modaddr);
|
||||
module_put(modaddr);
|
||||
preempt_enable();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(symbol_put_addr);
|
||||
|
||||
@@ -2355,12 +2359,17 @@ static void layout_symtab(struct module *mod, struct load_info *info)
|
||||
src = (void *)info->hdr + symsect->sh_offset;
|
||||
nsrc = symsect->sh_size / sizeof(*src);
|
||||
|
||||
/* strtab always starts with a nul, so offset 0 is the empty string. */
|
||||
strtab_size = 1;
|
||||
|
||||
/* Compute total space required for the core symbols' strtab. */
|
||||
for (ndst = i = strtab_size = 1; i < nsrc; ++i, ++src)
|
||||
if (is_core_symbol(src, info->sechdrs, info->hdr->e_shnum)) {
|
||||
strtab_size += strlen(&info->strtab[src->st_name]) + 1;
|
||||
for (ndst = i = 0; i < nsrc; i++) {
|
||||
if (i == 0 ||
|
||||
is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum)) {
|
||||
strtab_size += strlen(&info->strtab[src[i].st_name])+1;
|
||||
ndst++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Append room for core symbols at end of core part. */
|
||||
info->symoffs = ALIGN(mod->core_size, symsect->sh_addralign ?: 1);
|
||||
@@ -2394,15 +2403,15 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
|
||||
mod->core_symtab = dst = mod->module_core + info->symoffs;
|
||||
mod->core_strtab = s = mod->module_core + info->stroffs;
|
||||
src = mod->symtab;
|
||||
*dst = *src;
|
||||
*s++ = 0;
|
||||
for (ndst = i = 1; i < mod->num_symtab; ++i, ++src) {
|
||||
if (!is_core_symbol(src, info->sechdrs, info->hdr->e_shnum))
|
||||
continue;
|
||||
|
||||
dst[ndst] = *src;
|
||||
dst[ndst++].st_name = s - mod->core_strtab;
|
||||
s += strlcpy(s, &mod->strtab[src->st_name], KSYM_NAME_LEN) + 1;
|
||||
for (ndst = i = 0; i < mod->num_symtab; i++) {
|
||||
if (i == 0 ||
|
||||
is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum)) {
|
||||
dst[ndst] = src[i];
|
||||
dst[ndst++].st_name = s - mod->core_strtab;
|
||||
s += strlcpy(s, &mod->strtab[src[i].st_name],
|
||||
KSYM_NAME_LEN) + 1;
|
||||
}
|
||||
}
|
||||
mod->core_num_syms = ndst;
|
||||
}
|
||||
@@ -2944,6 +2953,10 @@ static int check_module_license_and_versions(struct module *mod)
|
||||
if (strcmp(mod->name, "driverloader") == 0)
|
||||
add_taint_module(mod, TAINT_PROPRIETARY_MODULE);
|
||||
|
||||
/* lve claims to be GPL but upstream won't provide source */
|
||||
if (strcmp(mod->name, "lve") == 0)
|
||||
add_taint_module(mod, TAINT_PROPRIETARY_MODULE);
|
||||
|
||||
#ifdef CONFIG_MODVERSIONS
|
||||
if ((mod->num_syms && !mod->crcs)
|
||||
|| (mod->num_gpl_syms && !mod->gpl_crcs)
|
||||
@@ -3157,6 +3170,9 @@ static struct module *load_module(void __user *umod,
|
||||
/* This has to be done once we're sure module name is unique. */
|
||||
dynamic_debug_setup(info.debug, info.num_debug);
|
||||
|
||||
/* Ftrace init must be called in the MODULE_STATE_UNFORMED state */
|
||||
ftrace_module_init(mod);
|
||||
|
||||
/* Find duplicate symbols */
|
||||
err = verify_export_symbols(mod);
|
||||
if (err < 0)
|
||||
|
||||
Reference in New Issue
Block a user