mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 22:12:16 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (46 commits) UIO: Fix mapping of logical and virtual memory UIO: add automata sercos3 pci card support UIO: Change driver name of uio_pdrv UIO: Add alignment warnings for uio-mem Driver core: add bus_sort_breadthfirst() function NET: convert the phy_device file to use bus_find_device_by_name kobject: Cleanup kobject_rename and !CONFIG_SYSFS kobject: Fix kobject_rename and !CONFIG_SYSFS sysfs: Make dir and name args to sysfs_notify() const platform: add new device registration helper sysfs: use ilookup5() instead of ilookup5_nowait() PNP: create device attributes via default device attributes Driver core: make bus_find_device_by_name() more robust usb: turn dev_warn+WARN_ON combos into dev_WARN debug: use dev_WARN() rather than WARN_ON() in device_pm_add() debug: Introduce a dev_WARN() function sysfs: fix deadlock device model: Do a quickcheck for driver binding before doing an expensive check Driver core: Fix cleanup in device_create_vargs(). Driver core: Clarify device cleanup. ...
This commit is contained in:
commit
c813b4e16e
131 changed files with 1786 additions and 617 deletions
|
@ -784,6 +784,7 @@ sys_delete_module(const char __user *name_user, unsigned int flags)
|
|||
mutex_lock(&module_mutex);
|
||||
/* Store the name of the last unloaded module for diagnostic purposes */
|
||||
strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
|
||||
unregister_dynamic_debug_module(mod->name);
|
||||
free_module(mod);
|
||||
|
||||
out:
|
||||
|
@ -1173,7 +1174,7 @@ static void free_notes_attrs(struct module_notes_attrs *notes_attrs,
|
|||
while (i-- > 0)
|
||||
sysfs_remove_bin_file(notes_attrs->dir,
|
||||
¬es_attrs->attrs[i]);
|
||||
kobject_del(notes_attrs->dir);
|
||||
kobject_put(notes_attrs->dir);
|
||||
}
|
||||
kfree(notes_attrs);
|
||||
}
|
||||
|
@ -1783,6 +1784,33 @@ static inline void add_kallsyms(struct module *mod,
|
|||
}
|
||||
#endif /* CONFIG_KALLSYMS */
|
||||
|
||||
#ifdef CONFIG_DYNAMIC_PRINTK_DEBUG
|
||||
static void dynamic_printk_setup(Elf_Shdr *sechdrs, unsigned int verboseindex)
|
||||
{
|
||||
struct mod_debug *debug_info;
|
||||
unsigned long pos, end;
|
||||
unsigned int num_verbose;
|
||||
|
||||
pos = sechdrs[verboseindex].sh_addr;
|
||||
num_verbose = sechdrs[verboseindex].sh_size /
|
||||
sizeof(struct mod_debug);
|
||||
end = pos + (num_verbose * sizeof(struct mod_debug));
|
||||
|
||||
for (; pos < end; pos += sizeof(struct mod_debug)) {
|
||||
debug_info = (struct mod_debug *)pos;
|
||||
register_dynamic_debug_module(debug_info->modname,
|
||||
debug_info->type, debug_info->logical_modname,
|
||||
debug_info->flag_names, debug_info->hash,
|
||||
debug_info->hash2);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline void dynamic_printk_setup(Elf_Shdr *sechdrs,
|
||||
unsigned int verboseindex)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_DYNAMIC_PRINTK_DEBUG */
|
||||
|
||||
static void *module_alloc_update_bounds(unsigned long size)
|
||||
{
|
||||
void *ret = module_alloc(size);
|
||||
|
@ -1831,6 +1859,7 @@ static noinline struct module *load_module(void __user *umod,
|
|||
#endif
|
||||
unsigned int markersindex;
|
||||
unsigned int markersstringsindex;
|
||||
unsigned int verboseindex;
|
||||
struct module *mod;
|
||||
long err = 0;
|
||||
void *percpu = NULL, *ptr = NULL; /* Stops spurious gcc warning */
|
||||
|
@ -2117,6 +2146,7 @@ static noinline struct module *load_module(void __user *umod,
|
|||
markersindex = find_sec(hdr, sechdrs, secstrings, "__markers");
|
||||
markersstringsindex = find_sec(hdr, sechdrs, secstrings,
|
||||
"__markers_strings");
|
||||
verboseindex = find_sec(hdr, sechdrs, secstrings, "__verbose");
|
||||
|
||||
/* Now do relocations. */
|
||||
for (i = 1; i < hdr->e_shnum; i++) {
|
||||
|
@ -2167,6 +2197,7 @@ static noinline struct module *load_module(void __user *umod,
|
|||
marker_update_probe_range(mod->markers,
|
||||
mod->markers + mod->num_markers);
|
||||
#endif
|
||||
dynamic_printk_setup(sechdrs, verboseindex);
|
||||
err = module_finalize(hdr, sechdrs, mod);
|
||||
if (err < 0)
|
||||
goto cleanup;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue