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 branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching

Pull livepatching fixes from Jiri Kosina:
"Two tiny fixes for livepatching infrastructure:

- extending RCU critical section to cover all accessess to
RCU-protected variable, by Petr Mladek

- proper format string passing to kobject_init_and_add(), by Jiri
Kosina"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching:
livepatch: RCU protect struct klp_func all the time when used in klp_ftrace_handler()
livepatch: fix format string in kobject_init_and_add()

+5 -5
+5 -5
kernel/livepatch/core.c
··· 314 314 rcu_read_lock(); 315 315 func = list_first_or_null_rcu(&ops->func_stack, struct klp_func, 316 316 stack_node); 317 - rcu_read_unlock(); 318 - 319 317 if (WARN_ON_ONCE(!func)) 320 - return; 318 + goto unlock; 321 319 322 320 klp_arch_set_pc(regs, (unsigned long)func->new_func); 321 + unlock: 322 + rcu_read_unlock(); 323 323 } 324 324 325 325 static int klp_disable_func(struct klp_func *func) ··· 731 731 func->state = KLP_DISABLED; 732 732 733 733 return kobject_init_and_add(&func->kobj, &klp_ktype_func, 734 - obj->kobj, func->old_name); 734 + obj->kobj, "%s", func->old_name); 735 735 } 736 736 737 737 /* parts of the initialization that is done only when the object is loaded */ ··· 807 807 patch->state = KLP_DISABLED; 808 808 809 809 ret = kobject_init_and_add(&patch->kobj, &klp_ktype_patch, 810 - klp_root_kobj, patch->mod->name); 810 + klp_root_kobj, "%s", patch->mod->name); 811 811 if (ret) 812 812 goto unlock; 813 813