Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux

Pull virtio and module fixes from Rusty Russell:
"YA module signing build tweak, and two cc'd to stable."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
virtio: Don't access index after unregister.
modules: don't break modules_install on external modules with no key.
module: fix out-by-one error in kallsyms

+21 -13
+3 -1
drivers/virtio/virtio.c
··· 225 225 226 226 void unregister_virtio_device(struct virtio_device *dev) 227 227 { 228 + int index = dev->index; /* save for after device release */ 229 + 228 230 device_unregister(&dev->dev); 229 - ida_simple_remove(&virtio_index_ida, dev->index); 231 + ida_simple_remove(&virtio_index_ida, index); 230 232 } 231 233 EXPORT_SYMBOL_GPL(unregister_virtio_device); 232 234
+16 -11
kernel/module.c
··· 2293 2293 src = (void *)info->hdr + symsect->sh_offset; 2294 2294 nsrc = symsect->sh_size / sizeof(*src); 2295 2295 2296 + /* strtab always starts with a nul, so offset 0 is the empty string. */ 2297 + strtab_size = 1; 2298 + 2296 2299 /* Compute total space required for the core symbols' strtab. */ 2297 - for (ndst = i = strtab_size = 1; i < nsrc; ++i, ++src) 2298 - if (is_core_symbol(src, info->sechdrs, info->hdr->e_shnum)) { 2299 - strtab_size += strlen(&info->strtab[src->st_name]) + 1; 2300 + for (ndst = i = 0; i < nsrc; i++) { 2301 + if (i == 0 || 2302 + is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum)) { 2303 + strtab_size += strlen(&info->strtab[src[i].st_name])+1; 2300 2304 ndst++; 2301 2305 } 2306 + } 2302 2307 2303 2308 /* Append room for core symbols at end of core part. */ 2304 2309 info->symoffs = ALIGN(mod->core_size, symsect->sh_addralign ?: 1); ··· 2337 2332 mod->core_symtab = dst = mod->module_core + info->symoffs; 2338 2333 mod->core_strtab = s = mod->module_core + info->stroffs; 2339 2334 src = mod->symtab; 2340 - *dst = *src; 2341 2335 *s++ = 0; 2342 - for (ndst = i = 1; i < mod->num_symtab; ++i, ++src) { 2343 - if (!is_core_symbol(src, info->sechdrs, info->hdr->e_shnum)) 2344 - continue; 2345 - 2346 - dst[ndst] = *src; 2347 - dst[ndst++].st_name = s - mod->core_strtab; 2348 - s += strlcpy(s, &mod->strtab[src->st_name], KSYM_NAME_LEN) + 1; 2336 + for (ndst = i = 0; i < mod->num_symtab; i++) { 2337 + if (i == 0 || 2338 + is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum)) { 2339 + dst[ndst] = src[i]; 2340 + dst[ndst++].st_name = s - mod->core_strtab; 2341 + s += strlcpy(s, &mod->strtab[src[i].st_name], 2342 + KSYM_NAME_LEN) + 1; 2343 + } 2349 2344 } 2350 2345 mod->core_num_syms = ndst; 2351 2346 }
+2 -1
scripts/Makefile.modinst
··· 16 16 __modinst: $(modules) 17 17 @: 18 18 19 + # Don't stop modules_install if we can't sign external modules. 19 20 quiet_cmd_modules_install = INSTALL $@ 20 - cmd_modules_install = mkdir -p $(2); cp $@ $(2) ; $(mod_strip_cmd) $(2)/$(notdir $@) ; $(mod_sign_cmd) $(2)/$(notdir $@) 21 + cmd_modules_install = mkdir -p $(2); cp $@ $(2) ; $(mod_strip_cmd) $(2)/$(notdir $@) ; $(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) 21 22 22 23 # Modules built outside the kernel source tree go into extra by default 23 24 INSTALL_MOD_DIR ?= extra